[Development] about the Cocoa/Freetype fontengine

René J. V. Bertin rjvbertin at gmail.com
Sat Dec 30 22:18:57 CET 2017


Nikolaus Waxweiler wrote:

> > DirectWrite rendering looks better than GDI rendering (in the sense that
> it is truer to the designed outlines and the spacing with fewer

That's not what I call looking better, but more veridical. The two can overlap 
but just as (actually, more) often they don't.

> compromises for black and white glyphs), yet so many people complained
> about blurry fonts that Microsoft lowered the gamma correction in IE to
> make the fonts look blacker.

Which confirms my claim that most users will give higher priority to on-screen 
legibility than to design veracity. Very understandably so.
IIRC Microsoft played into that themselves when they promoted Times New Roman to 
the de-facto standard variable-width font. Looks very different at usual screen 
point sizes than it does in print. Rendering it veridically (like CoreText 
apparently does) makes it very uncomfortable to read. 

> I mean fonts rendered through Infinality that match the specifics
> required for good looks and others that don't. That is the core problem.

I'm guessing you can find almost any number of combinations of fonts that bite 
when displayed next to each other. Not a fair argument.
I'm also pretty certain that people like "Bohomil" who spend/t hours tweaking 
fontconfig files do so in part to reduce such differences. I know only of 
FontConfig that allows to do this kind of font-specific tuning.

> Should be easy to find out. Filename ends with ".otf", you're most
> likely looking at a CFF font (see e.g. Cantarell).

I have lots of OpenType fonts that probably just contain TrueType inside.

> Cubic beziers inside
> the font are a dead giveaway.

And those are *so* easy to spot...

> Wait, what I was trying to say is that just because someone instructed
> some glyph in some way, doesn't mean it's been instructed well.

Oh. I missed that or you didn't succeed in that intention. I've doodled in font 
design myself and learned quite quickly it's much easier to mess up rendering 
than it is to improve things.

> And I think it is asking for users to complain about different looking
> fonts on their platform.

Seriously? Anyone complaining about something they asked for is begging not to 
be taken seriously.

Qt already has the possibility to switch to using FreeType, on MS Windows and 
since a few releases also on Mac. How many people complain about that?

How many people complained about fonts looking differently after having set up a 
GIGO font substitution table under Qt4?

> Err. Does 0 make a difference?

No.

> If not, you're probably not looking at a
> CFF font or something else is going on.

Probably some combination of both. Some day I should try to figure out what, 
maybe it's just that this font family gets lumped into a FontConfig category 
where it really shouldn't be. The fact may be telling that this also appears to 
be the only font family where the font smoothing gamma value has a significant 
effect.


>  From the screenshots, the apps appear to use a native font renderer.

I hesitated annotating my own last 2 screenshots, just to see if you'd ask or 
tell which was which...


I've been running the same applications on the same monitor using the XCB and 
Cocoa QPAs side by side for a bit over a year now, without very strong opinions 
over which was better on the eyes. I can now get (almost) exactly the same 
rendering in both modes by selecting the FontConfig path in the Cocoa QPA. I'm 
curious to see if I'll develop a preference.

R.




More information about the Development mailing list