Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line spacing inhomogeneous depending on characters used #459

Closed
twwwt opened this issue Jul 22, 2017 · 13 comments
Closed

Line spacing inhomogeneous depending on characters used #459

twwwt opened this issue Jul 22, 2017 · 13 comments
Milestone

Comments

@twwwt
Copy link

twwwt commented Jul 22, 2017

I'm not sure whether it is actually a problem of the font (or of how it is rendered), but the line spacing is sometimes inhomogeneous. Take as an example the following two images. Note the difference in line space between the second, third, and fourth line, which, in this example, is caused by the presence/absence of {.

sbi_-_atlas-core_src_main_java_ch_sbi_atlas_promos_symbol_predicate_java_-_eclipse

sbi_-_atlas-core_src_main_java_ch_sbi_atlas_promos_symbol_predicate_java_-_eclipse

@tonsky
Copy link
Owner

tonsky commented Jul 22, 2017

Can you isolate the issue? Single character, nothing on prev/next line?
What OS are you using? What editor?
Do you have the same problem with other fonts? With Fira Mono?

@twwwt
Copy link
Author

twwwt commented Jul 23, 2017

It seems that bold face has a different baseline than at least normal and light face. I see this on OS X 10.12.6 using Eclipse Oxygen 4.7.0.

sbi_-_atlas-core_src_main_java_ch_sbi_atlas_promos_symbol_predicate_java_-_eclipse

Note however that I don't see this behavior in that version of Eclipse using other fonts.

I've tried verifying it in other editors on the same machine but couldn't actually fine one whose syntax highlighting considers using bold face. Using Mac's Terminal app however seems to work:

tmo_px1____ _ssh_px1_ _160x30

@dhouck
Copy link

dhouck commented Jul 24, 2017

I’ve seen a lot of issues with bold in Eclipse, with different fonts. I haven’t seen a baseline difference, but I’ve used monospace fonts where Eclipse rendered the bold as a different character width.

I don’t know if this is a similar issue, but there’s at least a chance it’s part of Eclipse’s bold being broken.

@DivineDominion
Copy link

I just noticed this, too. Fira Mono's bold typeface appears to be larger, see bBoxType/FiraSans#14 and the screen shot from there:

screen shot 2017-07-27 at 09 17 59

Fire Code has a lot more weights, and instead of emboldening the normal weight, it might work to use a lighter weight by default and use the "medium" weight as a replacement for "bold" to achieve a similar contrast.

But it would of course be even better if Fira Code's weights appeared homogenous :)

@twwwt
Copy link
Author

twwwt commented Jul 27, 2017

@dhouck I'm not sure Eclipse is broken in this regard, simply because there are fonts that work. Would it mean that those fonts that work are kind of inversely broken such that combined with Eclipse's brokenness they cancel out their problems? Probably not. Do you know of issues that have been filed against Eclipse's bug tracking system about this?
The conclusion to me is that inhomogeneous line spacing must be related to Fira Code. Whether it is related to Fira Code only - I don't know.

@dhouck
Copy link

dhouck commented Jul 27, 2017

My experience with Eclipse had the problem with pretty much all fonts I tried and I think there was something broken with its underlying rendering. That might be a completely unrelated issue, especially if you can get most other fonts to work.

I didn’t file a report at the time, and since then I’ve change my setup. I’m not using Eclipse anymore, so I can’t reproduce it to file a report.

@DivineDominion
Copy link

Just wanted to chime in again and say that it indeed appears to be a font related setting that Eclipse simply does not mitigate. At least on Mac, that is. Is reproducible in macOS's TextEdit, too, and vanilla self-made apps that do not mangle with the baseline.

@tonsky
Copy link
Owner

tonsky commented Aug 7, 2017

I remember trying to fix the bold height but my kung-fu is too weak. As far as I remember Fira Mono has the same problem, and in the editor both weights has identical metrics

@sarahgerweck
Copy link

I also see this issue in Eclipse with Fira Code, but not with Consolas, Menlo, Courier, Courier New or Lucida Console. It's too bad because Fira Code is otherwise gorgeous.

@Holzschneider
Copy link

Holzschneider commented Oct 3, 2018

For me, this issue only affects the bold font face. Unfortunately, Eclipse does not allow the medium font face to be used for keyword highlighting instead (which is bold enough for my taste). So as a quick fix I edited (http://fontforge.github.io) the font weight field of the medium font to say "bold" and swapped it with the flawed bold font weight.

@waszqba
Copy link

waszqba commented Mar 24, 2019

Hi @tonsky , I was just about to create a new issue when I found this one.
I found out that depending on line content the spacing is sometimes is inconsistent. I am working on cLion on macOS Mojave with ligatures on.
Though I'm not sure if this has to do with Fira code or Fira in particular.
Please, let me know if I should to ask for help on Mozilla's GitHub or could it be related to your font only?

improper:
image
proper:
image

P.S. I love this font, your ligatures made my life easier. ❤️

@cfstras
Copy link

cfstras commented Jun 19, 2019

Same issue as in mozilla/Fira#168, #252

@tonsky
Copy link
Owner

tonsky commented Sep 10, 2019

Should be fixed in v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants