Skip to content

The underscore is too low #139

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

Closed
Grimy opened this issue Oct 26, 2015 · 7 comments
Closed

The underscore is too low #139

Grimy opened this issue Oct 26, 2015 · 7 comments

Comments

@Grimy
Copy link

Grimy commented Oct 26, 2015

Hack’s _ is way too low. This was already mentioned in #103 and is also linked to #100.

As I understand it, the core of the issue is that “Hack is designed such that underscores appear on the top-most pixels of the next line down.” (quote taken from #100). This supports the historical use of underscores as a way to underline text, but looks visually jarring in snake_case, and causes issues in many programs.

For example, in xterm, with faceName: Hack and all other settings at their default values, non-bold underscores do not render at all. With faceSize: 15 and Xft.antialias: 1, underscores look like extremely thin gray lines. As a workaround, setting scaleHeight: 1.05 (or greater) makes the underscores visible again.

One could blame xterm for incorrectly assuming that glyphs do not extend beyond the current line, but I believe this is quite a reasonable assumption, and Hack should live up to it (at least for ASCII chars). That’s what other fonts do, that’s what users expect, and it avoids trouble with naïve rendering engines (xterm, IDEA, probably others).

@burodepeper
Copy link
Member

Hi @Grimy,
We are currently looking into the usability of Hack, especially the ascii-charset, so the underscore will get the love it deserves. Could you post some screenshots of the issues you mention? That would help us a lot. Thanks!

@Grimy
Copy link
Author

Grimy commented Oct 26, 2015

Here is an example of the “thin gray line” behavior, where it looks like only the anti-aliased edge is rendered (zoom-in to see it):

result

The above is the text _p_ with the following xterm config:

xterm*faceName: Hack
*faceSize: 15
*foreground: white
*background: black
Xft.antialias:    1
Xft.autohint:     1
Xft.hinting:      0
Xft.hintstyle:    hintfull
Xft.rgba:         rgb

At face size 11, the undescore is just pure plain black, so there’s no need for a screenshot.

Thanks for your quick reply, it’s good to know that you’re already looking into this kind of issues!

@burodepeper
Copy link
Member

That indeed is a thin gray line. It isn't even visible in my Chrome, but Photoshop helps. This is indeed unacceptable, but it seems that the character is simply cut off. The underscore itself is positioned fully inside the glyph-box so it should be visible. I am unfamiliar with xterm, but could you see what happens if you define a line-height of 1.25 or greater?

See the picture attached; this is where the underscore is supposed to be...

schermafbeelding 2015-10-26 om 14 36 03

@Grimy
Copy link
Author

Grimy commented Oct 26, 2015

could you see what happens if you define a line-height of 1.25 or greater?

In xterm’s config, line-height is called “scaleHeight”. As I said in my opening post, setting “scaleHeight” to 1.05 or greater makes the underscore fully visible, but it is still unpleasantly low. Here’s how it looks:

p

I just noticed that I am using an old version of Hack: 552df98 (29 Aug). I’ll try updating to see if it changes anything.

@burodepeper
Copy link
Member

Yes, please update. : )
I believe all vertical metrics have been corrected in one the latest releases.

@Grimy
Copy link
Author

Grimy commented Oct 26, 2015

The problem is not present in Hack-v2_015-ttf. Sorry for the false alert!

I’ll close this issue, thanks for your attention (=

@Grimy Grimy closed this as completed Oct 26, 2015
@burodepeper
Copy link
Member

Not a problem! Have a nice day.

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

No branches or pull requests

2 participants