On Tue, 2015-05-12 at 13:10 -0400, Christian Schaller wrote:
But to make sure I understand the problem correctly; so from what I
understand there are two main 'camps' in regards to Font rendering,
'camp' being a collection of rendering settings. One we can call
which is what most professional font foundries tend to target with
which relies on fonts being heavily hinted to work well.
Well, I would say there is the Windows camp on one end, the Apple camp
on another, with Ubuntu and Fedora off in the middle. Or maybe a
triangle between Windows-Apple-Ubuntu.
is an interesting article. Note the first two images: our fonts look
more like Windows, and I get Epiphany bug reports all the time from
users who want their fonts to look more like OS X: "my fonts aren't
antialiased," (they are), "Epiphany fonts are broken" (maybe, I have no
clue, but no user has ever convinced me this is true). But if we make
them more like OS X, I'll instead get bug reports who want them to be
more like Windows. If you like Windows fonts, you say OS X fonts are
"blurry," but if you like OS X fonts, you say Windows fonts are "too
narrow." Note the third image: There is no best way to render fonts.
Also note that web view fonts ignore your GTK+ settings, the ones you
can set in Tweak Tool, and look at only fontconfig instead, since
fontconfig allows you to configure each font individually, whereas the
GTK+ settings are probably only optimal for the default GTK+ font.
is a good follow-up article. freetype-freeworld (used by Ubuntu,
presumably banned by RH legal?) does something similar to what Windows
is doing. Anyway, most users seem to think Ubuntu has fonts right, and
Fedora is wrong to not be exactly the same. Nobody seems to complain
about Ubuntu fonts, so I'd prefer to do exactly what they do, but we
Firefox is doing something different than Epiphany, though I'm not sure
what. Understanding code that uses fontconfig is very hard for me. It's
really a stupidly complicated library. :(
Then you have the one we currently use, lets call it the 'free
which works best when you have fonts that doesn't contain a lot of
most free fonts don't and Cantarell doesn't have in particular.
Um... I wouldn't say that. Cantarell's problem is broken hinting (which
makes the font blurrier) rather than lack of hinting. When a font
doesn't have native hints, the freetype light autohinter is used
instead. (We should maybe force this for Cantarell in fontconfig, which
will no doubt satisfy some people's complaints about our fonts, but
infuriate others.) Some people think this is awesome and would be happy
if we used it to override fonts' native hints. I think Debian and
openSUSE might do this by default, or at least used to.
Some fonts have hints that work badly expect in Windows. Open an
article on cnn.com
in Firefox for an example of one of these. Then open
it in Epiphany (in F22) and see the light autohinter producing a much
better result, but a result that's inconsistent with system fonts that
use native hints, which is unsatisfactory. (I change it to force the
light autohinter for web fonts for this reason. That's also what Chrome
does, although they're planning to stop doing so, because the light
autohinter is really only supposed to be used for fonts that don't have
And since people on Linux systems tend to use a mix of fonts they get
rendering depending on the fonts in question. And thus depending on
we want to use as default it probably needs to come hand in hand with
That's why we ignore GTK+ font settings in the web view: the GTK+ font
settings are presumably best for the GTK+ default fonts, but for web
view content, we'll trust fontconfig instead. This also perturbs users,
who complain that fonts are "wrong" after attempting to change settings
in Tweak Tool. In WebKit, we will turn off antialiasing (makes fonts
look TERRIBLE) if you do so in Tweak Tool, but I think we otherwise
ignore the settings (well, we use them as a base, but then we apply
fontconfig settings on top, overriding them).
Sorry for the rambling; this was a hard email to write.
Michael (wishes he had a solution to this)
P.S. Big disclaimer: I've looked into font rendering to a very
rudimentary degree for WebKit, but *I don't really understand any of