https://bugzilla.redhat.com/show_bug.cgi?id=1545149
Bug ID: 1545149 Summary: OTF/CFF conts no longer hinted horizontally Product: Fedora Version: 27 Component: freetype Assignee: mkasik@redhat.com Reporter: ossman@cendio.se QA Contact: extras-qa@fedoraproject.org CC: ajax@redhat.com, alexl@redhat.com, fonts-bugs@lists.fedoraproject.org, john.j5live@gmail.com, kevin@tigcc.ticalc.org, mbarnes@fastmail.com, mclasen@redhat.com, mkasik@redhat.com, rhughes@redhat.com, rstrode@redhat.com, sandmann@redhat.com
I upgraded from Fedora 26 to Fedora 27 and all of a sudden OTF/CFF fonts such as Cantarell are no longer hinted horizontally, making them appear blurry and out of focus.
A similar change was done for TTF fonts previously, but that could be reverted by setting "FREETYPE_PROPERTIES=truetype:interpreter-version=35".
Is there a similar setting hidden for this latest change? The normal font hinting settings have no effect on this.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
Nikolaus Waxweiler madigens@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madigens@gmail.com
--- Comment #1 from Nikolaus Waxweiler madigens@gmail.com --- OTFs weren't hinted horizontally before, what was turned off was stem darkening. If you prefer a thicker look, try
FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=0"
See https://www.freetype.org/freetype2/docs/text-rendering-general.html#disabled....
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #2 from Pierre Ossman ossman@cendio.se --- Hmm... I don't think that was it.
Crap. I can't really reproduce any issue. I should have taken screen shots back in February.
Perhaps there was something wrong with the auto-hinter that got fixed? Right now Cantarell looks like shit with the standard hinting. But the autohinter sorts that out, and it most definitely does some horizontal hinting, at least for Cantarell.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #3 from Pierre Ossman ossman@cendio.se --- Scratch that, even with the auto hinter it still is pretty bad when you actually start using it. And fortunately I found an old screen shot of how it used to render. So please see the attachment for a comparison. In the old version it used to hint horizontally very aggressively.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #4 from Pierre Ossman ossman@cendio.se --- Created attachment 1501958 --> https://bugzilla.redhat.com/attachment.cgi?id=1501958&action=edit rendering comparison
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #5 from Nikolaus Waxweiler madigens@gmail.com --- Interesting. I can't immediately find which FreeType F26 shipped with, your F26 image however looks like you had full hinting and autohinting active at the same time. Try adding this to your fontconfig config:
<match target="font"> <test name="family"> <string>Cantarell</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintfull</const> </edit> </match>
(Not sure if you need to use 'match target="font"' or '...="pattern"')
If that doesn't match what you had before, another possibility was that your FT was using the previous CFF renderer before Adobe contributed the one in current use. I don't think you can select the old one through fontconfig, it's a compile time option iirc.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #6 from Pierre Ossman ossman@cendio.se --- (In reply to Nikolaus Waxweiler from comment #5)
Interesting. I can't immediately find which FreeType F26 shipped with, your F26 image however looks like you had full hinting and autohinting active at the same time. Try adding this to your fontconfig config:
...
I already had such a file to force the autohinter. But the other additions had no effect.
But I was already enabling full hinting through gnome tweak tool. Anything other than full hinting gives blurry text almost by definition.
If that doesn't match what you had before, another possibility was that your FT was using the previous CFF renderer before Adobe contributed the one in current use. I don't think you can select the old one through fontconfig, it's a compile time option iirc.
I doubt it. Fedora 26 uses 2.7 according to the Fedora repo. And the Adobe engine was added in 2.5 if I understand things correctly.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #7 from Pierre Ossman ossman@cendio.se --- Aha! I think I found the missing detail to test this. You need to enable subpixel hinting as well. Apparently I disabled that somewhere along the line of finding a workaround for this issue.
So:
* Forced autohinter for Cantarell * Full hinting * Subpixel hinting
Then compare Fedora 28 and freetype-2.7.1-10.fc26. You'll see sharp stems with the 2.7.1, and fuzzy ones with 2.8.
You can test this directly on your Fedora 28 machine. Just download the old RPM here:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1045246
Unpack it using rpm2cpio, and then point at it using LD_LIBRARY_PATH. Then you can easily compare then new and old stuff.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #8 from Nikolaus Waxweiler madigens@gmail.com --- Do you mean subpixel rendering?
This is interesting. In ftview from that build, If I enable normal anti-aliasing (A) and forced autohinting (f) and switch to subpixel rendering (C) and forced autohinting, some glyphs seems to glitch by being a pixel or so wider at 16px (e.g. i, j, doubles quotes). Aside from that, nothing changes significantly?
In the newest ftview from git, I can't seem to enable full autohinting with subpixel rendering.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #9 from Nikolaus Waxweiler madigens@gmail.com --- Created attachment 1503145 --> https://bugzilla.redhat.com/attachment.cgi?id=1503145&action=edit Comparison shot
Upper left: ftview 2.7.1 with normal grayscale rendering plus forced autohinting Lower left: ftview 2.7.1 with RGB subpixel rendering plus forced autohinting Upper right: ftview git master with normal grayscale rendering plus forced autohinting
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #10 from Nikolaus Waxweiler madigens@gmail.com --- Going on a limb here, have you tried enabling warping? Only available in slight autohinting mode.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #11 from Pierre Ossman ossman@cendio.se --- instead. (In reply to Nikolaus Waxweiler from comment #8)
Do you mean subpixel rendering?
Right, sorry. ftview does its own thing, so I started simply comparing GTK applications. The setting I was referring to here is "Antialiasing: Subpixel" in GNOME Tweaks.
This is interesting. In ftview from that build, If I enable normal anti-aliasing (A) and forced autohinting (f) and switch to subpixel rendering (C) and forced autohinting, some glyphs seems to glitch by being a pixel or so wider at 16px (e.g. i, j, doubles quotes). Aside from that, nothing changes significantly?
ftview's rendering doesn't seem to be representative of what GTK does, so it might not be the best test case. Your image does show a bit of the tendencies though as there are a lot of single pixel wide stems in the lower left example.
(and the glitch is mentioned on bug 1035486 comment #36)
In the newest ftview from git, I can't seem to enable full autohinting with subpixel rendering.
Isn't that the problem though? Neither ftview nor GTK is able to get that mode fully working.
(In reply to Nikolaus Waxweiler from comment #10)
Going on a limb here, have you tried enabling warping? Only available in slight autohinting mode.
It seems to have some effect, but it doesn't even compensate for the extra blur caused by going from full hinting to slight.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
--- Comment #12 from Ben Cotton bcotton@redhat.com --- This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1545149
Pierre Ossman ossman@cendio.se changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|27 |28
fonts-bugs@lists.fedoraproject.org