source-foundry / Hack

A typeface designed for source code
http://sourcefoundry.org/hack/
Other
16.49k stars 615 forks source link

[Linux] font height inconsistency with Hack 3.001 release #379

Closed articuluxe closed 6 years ago

articuluxe commented 6 years ago

hack-3 1_vs_hack-3 0

I upgraded today to hack 3.1.0. I install it by cloning the github repo and copying the ttf fonts from build/ttf/*.ttf. When using the new fonts, I now notice seeming irregularities in the heights of certain glyphs, using the same application (Emacs 25.1.1) on the same Fedora OS (Linux 2.6.32-431.11.2.el6.x86_64) and same window manager (XFCE). I use "Hack 10"

I'm including a screen-shot here, on the left is the new 3.1.0, on the right the prior (which I believe was 3.0.0, it would have been whatever was available from the repo as of a week or two ago). Note how the "r"'s on the left are smaller than surrounding letters; "p" also seems small, while "a" seems big.

chrissimpkins commented 6 years ago

Thanks for this report @articuluxe. This appears to be the same issue that was introduced with v3.001 and reported on Windows systems in #377. We are hard at work on a fix and I am hoping to have something available over the weekend. In the meantime, revert back to the v3.000 release and we will notify in both this thread and the Windows thread when it is available. Sorry for the troubles. We seem to be having some problems with build dependencies for ttfautohint that have changed between releases.

I will update your report title to indicate that this is a Linux specific issue for users who wander by the repo with the same problem before the fix is released.

chrissimpkins commented 6 years ago

I updated our release that includes this bug with information for Linux users to use v3.000 until fix is available.

chrissimpkins commented 6 years ago

Will continue the discussion about the fix in #377 unless we identify Linux specific problems that are appropriate for this thread. Please join us there for the conversation and leave this thread open for Linux user notification. Thanks

chrissimpkins commented 6 years ago

Are you available for testing as we push new builds in an attempt to address this issue? I may have something as early as this evening

articuluxe commented 6 years ago

I can try but the Linux box I have access to is at my work, so I won’t have access over the weekend.

On Jan 26, 2018, at 12:18 PM, Chris Simpkins notifications@github.com wrote:

Are you available for testing as we push new builds in an attempt to address this issue? I may have something as early as this evening

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chrissimpkins commented 6 years ago

No worries. Will post here when they are available.

chrissimpkins commented 6 years ago

If anyone on Linux is available to test this issue, here are a new set of builds that may address the problem:

https://github.com/source-foundry/Hack/commit/e480b1bbc44f5271d40e98deccb35acc55d7bc74

chrissimpkins commented 6 years ago

Possible FIX:

https://github.com/source-foundry/Hack/issues/377#issuecomment-361012178

Please read information in that post, attempt to install the linked build files with the instructions for Linux users (including clearing font cache) on our README, and let me know if this addresses the issue for you. We will need feedback about any new rendering issues that arise with this change as it is possible that we will need to manually address the automated hints after this change. I posted a text specimen to use for testing across sizes 8 - 14 in that post. Thanks in advance for your help!

chrissimpkins commented 6 years ago

I reviewed the builds linked in https://github.com/source-foundry/Hack/issues/379#issuecomment-361012703 across all four variants x sizes 8 - 14 x specimen included in image below on Ubuntu. We appear to be in good shape.

Displayed at size 10:

font-ubuntu-render

chrissimpkins commented 6 years ago

This fix was released as v3.002. Please give these new builds a try and let me know if you continue to have any problems. Please reopen the thread if there are any further problems after the new install. Thanks for your patience.

articuluxe commented 6 years ago

It looks good to me so far.

Thanks for a great font!

On Jan 28, 2018, at 8:12 PM, Chris Simpkins notifications@github.com wrote:

This fix was released as v3.002. Please give these new builds a try and let me know if you continue to have any problems. Please reopen the thread if there are any further problems after the new install. Thanks for your patience.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chrissimpkins commented 6 years ago

@articuluxe Great to hear!! Thanks again for reporting this to us. I appreciate your time.

chrissimpkins commented 6 years ago

@articuluxe would it be possible to share your hinting settings on Fedora with us? I have heard from other Linux distro users that this did not affect them. Possible that their default settings are ignoring our hints whereas Fedora uses the hints defined by fonts as default.

articuluxe commented 6 years ago

Sure I can share them; but how do I access them?

On Feb 1, 2018, at 10:44 AM, Chris Simpkins notifications@github.com wrote:

@articuluxe would it be possible to share your hinting settings on Fedora with us? I have heard from other Linux distro users that this did not affect them. Possible that their default settings are ignoring our hints whereas Fedora uses the hints defined by fonts as default.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chrissimpkins commented 6 years ago

@articuluxe This is an older article and I don't know if it still applies on Fedora, but it sounds like xrdb -query should display the settings?

http://peter.kingofcoders.com/?p=177

chrissimpkins commented 6 years ago

@articuluxe also an interesting comparison with (historic) settings on Ubuntu. I'd like to take a look at current versions of these distros to get a sense for how they are setting defaults now.

articuluxe commented 6 years ago

Xft.dpi: 96 Xft.antialias: 1 Xft.hintstyle: hintfull Xft.rgba: none Xcursor.theme:
Xcursor.size: 0 Xcursor.theme_core: 1

Please note this is from fedora 27 (the machine was upgraded from 26 to 27 yesterday, oops!)

On Feb 1, 2018, at 3:49 PM, Chris Simpkins notifications@github.com wrote:

@articuluxe also an interesting comparison with (historic) settings on Ubuntu. I'd like to take a look at current versions of these distros to get a sense for how they are setting defaults now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chrissimpkins commented 6 years ago

@articuluxe thanks! I believe that those values do differ from Ubuntu defaults. Here is (old'ish) information on how ubuntu sets defaults:

Xft.antialias:  1
Xft.dpi:    96
Xft.hinting:    1
Xft.hintstyle:  hintslight
Xft.lcdfilter:  lcddefault
Xft.rgba:   rgb

as well as technical documentation from Werner on the hintstyle issue:

https://www.freetype.org/freetype2/docs/text-rendering-general.html

which includes these comments:

I also hope this change will make it easier for the non-Windows-and-Apple ecosystem to switch over to slight hinting as the default. Current full/medium native hinting, as is the default, tends to bring out the worst in many, many fonts that haven’t seen the same insane dedication to on-screen display and hinting as many popular Microsoft fonts, for example. And since ClearType is still not fully supported, you usually get a very poor default experience. Slight hinting gives a much better one, as Ubuntu has proven over the years.

and information about how to improve font rendering on Linux from the Manjaro wiki and a Fedora users' web site:

http://peter.kingofcoders.com/?p=177

https://wiki.manjaro.org/index.php?title=Improve_Font_Rendering

It might be worth trying to adjust your values on Fedora and see if you have better font rendering for all fonts on your system.

I really appreciate your time invested to get this information to us. This is very helpful!

chrissimpkins commented 6 years ago

Unclear what the relationship is of the hintslight vs. hintfull and the original problem that you reported but I suspect that it is the root of the distro specific differences between Fedora and Ubuntu that were seen when we analyzed this issue.

reinhart1010 commented 6 years ago

Unclear what the relationship is of the hintslight vs. hintfull and the original problem that you reported

image

Linux has font rendering settings that allows users to set hinting and antialiasing for fonts. Xft.hintstyle refers to hinting settings which can be set to "none", "slight", "medium" and "full".

This might look similar to the ClearType Text Tuner program to adjust font hinting in Windows.

image

chrissimpkins commented 6 years ago

Thanks @reinhart1010