Fedora 26 and a font rendering dilemma for me

August 25, 2017

I recently upgraded my office workstation from Fedora 25 to Fedora 26, which didn't go entirely smoothly. One of the things that didn't is fonts, or more specifically a change in font rendering. I have a long standing set of fontconfig user tweaks that are supposed to give me relatively light-weight fonts, and they've now stopped working all that well (although it turns out they haven't completely stopped working).

To make this concrete, ere are three images of xterm using DejaVu Sans Mono 10, all displaying on the same machine via the magic of remote X. The Fedora 25 image is my normal and preferred font rendering, the 'Fedora 26' image is the stock font rendering on Fedora 26, and the 'Fedora 26 me' image is how Fedora 26 renders fonts with my fontconfig settings (which is almost identical to the stock rendering, but slightly lighter in spots and I think less antialiased).

Fedora 25 xterm Fedora 26 xterm Fedora 26 xterm with my fontconfig

This is not the first time I've had my font rendering change around to give me darker fonts; it once happened with Ubuntu 10.04 and was ultimately resolved as a different in fontconfig settings (see the comments here). Unfortunately this isn't the case this time around; instead, it appears to be a change in how FreeType renders exactly the same fontconfig setup. Something in the shift from version 2.6.5 (in Fedora 25) to 2.7.1 (in Fedora 26) seems to be ignoring parts of my fontconfig customizations.

(The Fedora 25 and Fedora 26 /etc/fonts and /usr/share/fontconfig are almost identical, and my usual diagnostic tools like 'fc-match -v monospace' and 'FC_DEBUG=1025 xterm' claim that there is no difference in computed results. Even the versions of fontconfig itself are essentially identical. I verified it was the Fedora 26 version of FreeType by copying the Fedora 25 libfreetype.so to my Fedora 26 machine and using it with LD_LIBRARY_PATH.)

This leaves me with a dilemma. On the one hand, perhaps I could invest a lot of effort into figuring out either what I need to do to FreeType to fix this rendering issue (I've built custom versions back in the old days) or what magic new options to use in my fontconfig settings to make FreeType 2.7.1 render things the old way. On the other hand, not only would this be a bunch of work invested in fighting how FreeType really wants to render fonts, but maybe the new rendering is actually objectively more readable, even if it looks wrong to me.

I'm very used to my thin font rendering; I've literally been looking at it for years. The thicker rendering that FreeType does by default (and more or less forces in Fedora 26) looks viscerally wrong and feels annoyingly different. But this doesn't mean that my old fonts are more readable, and in fact I've made that sort of mistake before, which makes me suspicious about the idea that I know better than everyone working on FreeType and font configuration on Linux (it's not just Fedora, since just about everyone seems to default to this thicker and darker style of font rendering).

It irritates me to give in this way, and I definitely feel run over by the sprawling mess that is modern display fonts on Linux and Unix generally (given Wayland, it's not really accurate to call them just 'X fonts' any more). I reflexively don't like surrendering to city hall this way. But maybe it's for the better, and it's certainly going to be easier.

As an experiment I've now turned off my fontconfig customizations even on Fedora 25, by renaming my .config/fontconfig/fonts.conf to another name. It's, well, different. But I haven't yet changed back, and I can probably live with it after I get used to it. After all, I've gone through big font changes before, when I moved from old bitmapped fonts in xterm and even my web browser to modern XFT fonts, and I survived back then.

Comments on this page:

From at 2017-08-25 02:25:27:

Yeah, if I used Fedora, I'd keep re-enabling the patented ClearType interpreter 'til the end of time. I'd say the result (which I get on Arch) is a good middle ground between your old "overly thin and jagged" sample and the new "nearly indistinguishable from bold" one.

But the situation might change in the future as freetype itself now has a free alternative interpreter called "Harmony". So with the next version, you might get nicer fonts without having to patch.

To save you the time, you can revert to the old rendering with FREETYPE_PROPERTIES='truetype:interpreter-version=35'.

Fixing this crap nonstop is why I still use the trusty old 6x13 bitmap font where possible.

By Anon at 2017-08-25 14:26:42:

You can read more about some of the latest FreeType interpreter changes here: https://www.freetype.org/freetype2/docs/subpixel-hinting.html .

By Don Quixote at 2017-08-25 14:52:34:

Come on, pick up your lance and come tilt at this windmill with me.

I've fought similar battles with fonts in XTerm (*) for years.

Though usually with the color, size, bold, etc battles.

  • I don't bother with other terminal emulators as they don't do many other things that I want.
By chipb at 2017-08-26 22:53:13:

My preference for lighter-weight font notwithstanding, the F26 rendering looks better to me. Letter spacing is improved (the "awk" sequence seems crowded on F25) and individual glyphs are closer to what I imagine the designer intended (the offset central dot in "0" on F25 is grating to me, the "e" is more balanced at least on stock F26, perhaps more if I stared longer).

Written on 25 August 2017.
« Why Go changes its minimum version requirements for OSes (and hardware)
The probable coming explosion of Firefox 57 »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Aug 25 01:45:22 2017
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.