[Development] about the Cocoa/Freetype fontengine

Nikolaus Waxweiler madigens at gmail.com
Fri Dec 29 12:06:58 CET 2017

>> Besides, fontconfig with infinality patches honestly gives a
>> beautiful rendering, crispier and yet fuller than everything you
>> can see on othe OSes in my taste.
> I agree completely, except - I'm not (yet) convinced that the
> Infinality patches to FreeType are of any effect on Mac. Fonts
> rendered with FreeType look fuzzier than with CoreText, which in turn
> looks fuzzier than fonts rendered with that same FreeType library
> under X11 (XQuartz). - The stem-darkening change in Qt 5.9 does
> trigger side-effects with certain fonts when using the FontConfig
> Ultimate patches and/or config files. For now I've only found this to
> be the case for the Novarese font (all versions I have of it). Sadly
> I happen to like that font a lot, including for use in UI elements.

I don't get it. How will this improve the look of Qt-Mac applications?

Apps using CoreText will look different than Qt apps linking to a 
patched FreeType and FontConfig. It is unlikely that these patches will 
ship in official builds (they're not mainlined for a reason), so it 
would only be your custom compiled applications. The difference would be 

Aside: The Infinality patches make fonts look good only under very 
specific circumstances and inevitably lead to jarring differences when 
some font next to the "good" ones doesn't fit the specifics. I wasted a 
lot of time on that patch set when I was young. The entire patch is 
tailored to a platform that never rendered fonts correctly. Qt 5.9 iirc 
made a start with linear alpha blending and gamma correction for CFF 
fonts and compensating the contrast loss with stem darkening.

The fuzziness FT > CoreText > FT X11 is because on X11, some form of 
hinting is usually turned on and there is no linear alpha blending plus 
gamma correction, leading to harsher rendering that only appears less 
fuzzy. CoreText ignores hints but darkens stems (overly so by default) 
to counter the effects of gamma correction, FT will only do that when 
told so.

You probably shouldn't enable stem darkening when using the Infinality 
set or turn off hacks for CFF fonts until there are no more issues.

More information about the Development mailing list