Bug 1469712 - font antialiasing/hinting is not working on Fedora 26
font antialiasing/hinting is not working on Fedora 26
Status: CLOSED DUPLICATE of bug 1470509
Product: Fedora
Classification: Fedora
Component: freetype (Show other bugs)
26
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Marek Kašík
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-11 13:17 EDT by Mauro Carvalho Chehab
Modified: 2017-11-10 08:00 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-25 05:01:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Font hinting sample F25 and F26 (11.03 KB, image/png)
2017-07-22 07:03 EDT, Radu Rendec
no flags Details
screenshot of xfce's appearance dialog with RGB subpixel selected (1.40 KB, image/png)
2017-11-01 04:46 EDT, Clemens Eisserer
no flags Details

  None (edit)
Description Mauro Carvalho Chehab 2017-07-11 13:17:46 EDT
Description of problem:

After upgrading from Fedora 25 to Fedora 26, font hinting doesn't work anymore. 

All fonts look really ugly on my 32' monitor, and changing font antialias/hint options at Gnome, Plasma or Mate doesn't produce any visible changes anymore.

With Fedora 25, I used freetype-freeword from rpmfusion, as it produced a better result than the default freetype font hinting (although both work). On Fedora 26, neither with or without freetype-freeword I can adjust font hint/antialias anymore, as those options don't work anymore.

Version-Release number of selected component (if applicable):

freetype-2.7.1-9.fc26.x86_64
Comment 1 Marek Kašík 2017-07-12 11:54:37 EDT
Hi,

could you attach here a screenshot of the issue in e.g. gedit or gtk3-demo? Do you see this behaviour with some specific font?
Comment 2 Andreas M. Kirchwitz 2017-07-12 22:50:51 EDT
Sounds like a similar problem I have after a fresh installation from Fedora 25 to 26 (Workstation edition, official release with all recent updates). I'm using a copy of the font files for "Arial" and "Courier New" from an original MS Windows system. Both fonts look very pretty even *without* Anti-Aliasing, which can useful on screens with < 2K resolution.

"Arial" is specifically designed to look excellent with and without Anti-Aliasing. It's for a reason why this font is so popular. :-)

Starting with Fedora 26, "Arial" (and Courier New) looks ugly without Anti-Aliasing (like most non-bitmap fonts do for years). It still looks okay with Anti-Aliasing enabled.

I've tried with "gnome-tweak-tool" and also with ~/.config/fontconfig/fonts.conf, but "Arial" won't look pretty without Anti-Aliasing.

There seems to be something broken with font rendering in Fedora 26.
Comment 3 Albert Kurucz 2017-07-17 11:24:40 EDT
I had the same problem.
This solution worked for me on Fedora 26:

echo export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\" | sudo tee -a /etc/profile.d/freetype2.sh
Comment 4 Andreas M. Kirchwitz 2017-07-17 18:34:51 EDT
Great hint! That seems to work really fine for most applications including GTK (Menus, Titles, other texts), Firefox and Thunderbird (that's were I personally use non-antialiased "Arial" the most).

However, now with Arial defined to be non-antialiased again (like I did in Fedora 25 and before), suddenly Google Chrome totally freaks out. (It worked fine in previous Fedora releases.)

For unknown reasons Chrome seems to disable "hinting" as soon as a font is non-antialiased. The very same menus and other texts that look fine in Firefox, they are basically unreadable in Chrome. It doesn't matter if/how FREETYPE_PROPERTIES is set, Chrome seems to ignore it completely. Maybe Chrome cannot handle the new version of the freetype library.

(Even with Anti-Aliasing turned off, Hinting is still essential to have nicely rendered fonts.)

The problem is that a lot of web sites use "Arial" as default font, so it must look good in Firefox and Chrome. (Even for systems with Arial installed, same applies for the replacement font... it must look good in both browsers.)

In Fedora 25 and before Chrome basically ignored fontconfig. Even if I configured "Arial" to be non-antialiased, Chrome displayed it antialiased. That was okay. I rarely use Chrome, and I could live with antialiased Arial in Chrome if at least the hinting worked. In Fedora 26 Chrome now respects the non-antialiased configuration but fails with the hinting.
Comment 5 Radu Rendec 2017-07-22 07:03 EDT
Created attachment 1302723 [details]
Font hinting sample F25 and F26

I have the same problem. Setting FREETYPE_PROPERTIES as advised in comment #3 *does* help.

It would be nice though if this worked out-of-the-box. Attaching a screenshot of the *default* behaviour (i.e. *without* setting FREETYPE_PROPERTIES).
Comment 6 Marek Kašík 2017-07-25 05:01:24 EDT
This is the same problem as in the bug #1470509. Freetype has changed default hinting engine in 2.7 from v35 to v40. The change is more apparent when the antialiasing is off. You can reproduce it in e.g. ftview by running "ftview -m "This is a test text" 19 /usr/share/fonts/dejavu/DejaVuSansMono.ttf", turning off antialiasing by pressing "a" and then you can switch between the hinting modes by pressing "H".
Upstream won't change it back and so we won't too.

If you prefer the older hinting engine, you can select it by setting environment variable "FREETYPE_PROPERTIES" to "truetype:interpreter-version=35" in e.g. ~/.bash_profile.

I'm closing this as notabug since the change is intentional (and looking at the freetype mailing list, they know about the visual change, also see https://www.freetype.org/freetype2/docs/subpixel-hinting.html for more info about the engine).

*** This bug has been marked as a duplicate of bug 1470509 ***
Comment 7 Clemens Eisserer 2017-11-01 04:43:11 EDT
Market: This bug is not about different appearance - but about subpixel antialising not working anymore (please see the screenshot attached - taken from the xfce font settiongs dialog). 

I can't imagine that loosing subpixel hinting is intentional.
Comment 8 Clemens Eisserer 2017-11-01 04:46 EDT
Created attachment 1346382 [details]
screenshot of xfce's appearance dialog with RGB subpixel selected
Comment 9 Clemens Eisserer 2017-11-01 04:52:14 EDT
Update: In my case I had to install freetype-freeworld to get RGB / subpixel-antialiasing to work again. It has absolutly *nothing* to do with the truetype interpreter version as mentioned my Marek.
Comment 10 Marek Kašík 2017-11-10 08:00:48 EST
(In reply to Clemens Eisserer from comment #7)
> Marek: This bug is not about different appearance - but about subpixel
> antialising not working anymore (please see the screenshot attached - taken
> from the xfce font settiongs dialog). 

Actually, original reporter did not respond to my questions and did not provide a screenshot so we really don't know about what this bug is about. But it seemed to  describe the change which happened in hinting.

It would be better if you could open a separate bug for your issue so I can evaluate it properly (so I see which version of OS and freetype you use).

Note You need to log in before you can comment on or make changes to this bug.