Bug 1470509

Summary: freetype/harfbuzz fc25->fc26 turns to ugly rendering
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: freetypeAssignee: Marek Kašík <mkasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 26CC: behdad, dan, fonts-bugs, kevin, linuxhippy, mchehab, mkasik, samuel.rakitnican
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-14 13:45:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot from fc26 with fc25 freetype+harfbuzz under XFCE
none
screenshot from fc26 with fc26 freetype+harfbuzz under XFCE none

Description Peter Bieringer 2017-07-13 05:23:56 UTC
Description of problem:
While on fc25 I have sharp fonts on a 1600x1200 96 dpi display after upgrade to fc26 the rendering is ugly


Version-Release number of selected component (if applicable):
freetype-2.7.1-9.fc26.x86_64
harfbuzz-1.4.4-1.fc26.x86_64
harfbuzz-icu-1.4.4-1.fc26.x86_64
(from updates-testing)
+ fc26 original


How reproducible:
at least on 2 systems

Steps to Reproduce:
1. upgrade to fc26
2. login


Actual results:
bad system font rendering

Expected results:
same rendering as on fc25


Additional info:
# xrdb -q
Xft.lcdfilter:	lcddefault
Xft.antialias:	0
Xft.hinting:	1
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
Xft.dpi:	96
Xcursor.theme:	default
Xcursor.size:	21
Xcursor.theme_core:	1

after downgrade with fc25 packages: 
freetype-2.6.5-1.fc25.x86_64.rpm
harfbuzz-1.3.2-1.fc25.x86_64.rpm
harfbuzz-icu-1.3.2-1.fc25.x86_64.rpm 

after reboot returns to previous and well rendering behavior.

Comment 1 Marek Kašík 2017-07-13 10:50:31 UTC
Hi, could you attach here a screenshot of the problem? Ideally before and after?

Comment 2 Peter Bieringer 2017-07-13 17:47:20 UTC
Created attachment 1297783 [details]
screenshot from fc26 with fc25 freetype+harfbuzz under XFCE

same good font rendering as under fc25

Comment 3 Peter Bieringer 2017-07-13 17:48:57 UTC
Created attachment 1297784 [details]
screenshot from fc26 with fc26 freetype+harfbuzz under XFCE

ugly rendering, not equal to fc25 - nothing changed beside simply updating the 3 RPMs:

freetype harfbuzz-icu harfbuzz

Comment 4 Marek Kašík 2017-07-14 13:45:15 UTC
Hi, thank you for the screenshots.

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. Or you can have a look whether a newer set of fonts would suit you better with the default hinting engine.

I'm closing this as notabug since the change is intentional (and looking at the freetype mailing list, they know about the visual change of DejaVu fonts).

Comment 5 Peter Bieringer 2017-07-15 07:12:57 UTC
Hi, thank you for all the details.

I hope freetype team had a very valid reason why they changed the default behavior - imho this can cause a bunch of unhappy users.

The only good thing is that old behavior can be permanently enabled by e.g.

cat <<END >/etc/profile.d/LOCAL-freetype.sh 
FREETYPE_PROPERTIES="truetype:interpreter-version=35"
export FREETYPE_PROPERTIES
END

until the old interpreter version disappears in code...but perhaps until then the next improved "default" appears.


> Or you can have a look whether a newer set of fonts would suit you better with the default hinting engine

Are there any suggestions already around which "newer set of font" is more compatible to new hinting engine...or has community wait now until first "compatible font" appears...

I've tested mostly all previously on fc25 installed and therefore on fc26 updated fonts, all look ugly.


I personally not a fan of all the antialiasing stuff (for normal desktop displays)...it reminds me to old CRT times and implicit unsharp fonts before LCD (with sharp fonts) become common use - looks like times are rolling back.

Comment 6 Kevin Kofler 2017-07-15 10:29:37 UTC
I assume the new hinting engine has been tested with and optimized for anti-aliased rendering only. There are not many people still using non-anti-aliased fonts in 2007. They just always look pixelated.

If you think anti-aliased fonts are too blurry, try:
1. playing with the hinting level. The default is (was actually, for some reason, recently changed to) slight hinting. I use medium hinting, which gives a lot sharper fonts. Don't ask me why that is no longer the default.
2. trying out subpixel anti-aliasing with freetype-freeworld. That gives sharper anti-aliasing on almost all LCD monitors. (I think the horizontal RGB layout is the right one for most monitors. But if it doesn't look right, try the others.)

Comment 7 Peter Bieringer 2017-07-16 07:32:28 UTC
Before receiving your ultimative hint to switch back to previous hinting engine, I tried already playing around with the hinting level -> no real success

Also tried "freetype-freeworld" -> but subpixel rendering by color did also not satisfy me.

on a 100 dpi 1600x1200 LCD (antialiasing=off, hinting=medium), "good eyes" and doing 50% command line work I personally prefer sharp fonts (even in the browser for smaller fonts) - let see whether I'm the only one...

On a 190 dpi display the new rendering engine + antialiasing + medium hinting is looking good.

Comment 8 Marek Kašík 2017-07-19 09:26:24 UTC
(In reply to Peter Bieringer from comment #5)
> > Or you can have a look whether a newer set of fonts would suit you better with the default hinting engine
> 
> Are there any suggestions already around which "newer set of font" is more
> compatible to new hinting engine...or has community wait now until first
> "compatible font" appears...
> 
> I've tested mostly all previously on fc25 installed and therefore on fc26
> updated fonts, all look ugly.

I was speaking about Calibri and Cambria as mentioned in https://www.freetype.org/freetype2/docs/subpixel-hinting.html (I forgot to add the link before, sorry).
But looking at how they look with the new hinting engine without anti-aliasing these are not a good choice for you.

Comment 9 Marek Kašík 2017-07-25 09:01:24 UTC
*** Bug 1469712 has been marked as a duplicate of this bug. ***

Comment 10 Dan Horák 2017-08-18 16:36:06 UTC
For the record - I had the issue with the Anonymous Pro font in terminal, which needs antialiasing disabled for best clarity (at least in F<=25). Will try with antialiasing enabled and the new v40 interpreter.

Comment 11 Clemens Eisserer 2017-11-01 08:41:54 UTC
Please re-open 1469712, which is about not working subpixel-antialising - not just the different rasterization of glyphs.

Comment 12 srakitnican 2019-05-29 13:56:40 UTC
I am literally feeling pain in my eyes from a long session with the new v40 interpreter. The solution from comment 5 feels much better.