[Webkit-unassigned] [Bug 140994] [GTK] Fonts loaded via @font-face look bad

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 23 20:07:30 PST 2015


--- Comment #20 from Michael Catanzaro <mcatanzaro at igalia.com> ---
OK, a few further discoveries:

* The GTK+ font settings (e.g. gtk-xft-hintstyle) are used to replace the default cairo font settings in getDefaultCairoFontOptions(), but most of them will be overridden immediately by fontconfig except for web fonts. With my patch the settings for web fonts will be overridden too, which will be more consistent.
* Since GTK+ uses xsettings, your normal desktop font settings "pollute" the jhbuild environment, which is why Martin and I had different results. Martin has GTK+ set to slight hinting but mine is set to medium hinting. Slight hinting forces use of the autohinter, so it means the font's native hints aren't used at all. I think the native hints are broken in these fonts, because they look dramatically better when slight hinting is used.
* The more I learn about our font configuration, the less I understand....

Now, I think we should actually go with a combination of Martin's patch and mine, and force autohinter use for all web fonts. For many fonts this will (subjectively) not look as good as medium or full hinting, and it will be inconsistent to ignore the system configuration for this one setting for web fonts, but I think most people won't notice and it has a huge advantage: we don't have to worry about problems with native hinting. My guess is those two fonts look terrible because their hinting is broken, and other browsers (except Firefox on Linux) don't use the native hinting, so webmasters don't notice. (This is just a guess.) But the autohinter should always produce a decent result, I think. And there is another advantage: by disabling native hints, FreeType will no longer be executing bytecode from potentially malicious fonts, which has caused security issues in the past. On the other hand, the Chromium folks are currently forcing the autohinter as well but want to switch to nativ

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150224/05f3c2b4/attachment-0002.html>

More information about the webkit-unassigned mailing list