summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNikolaus Waxweiler <madigens@gmail.com>2015-10-07 22:22:08 +0200
committerBastien Nocera <hadess@hadess.net>2015-11-03 14:08:46 +0100
commite2926353e471955e8e684264e826da5b8643e83e (patch)
treeda8af4ebbffca6941e8322857a309f1845888065 /data
parent963cea9db69657e8e6ebec91cd923f0b9837526d (diff)
downloadgnome-settings-daemon-e2926353e471955e8e684264e826da5b8643e83e.tar.gz
xsettings: Change font hinting to default to 'slight'
The current default of "medium" is problematic because "medium" and "full" are coarse descriptions that mean different things to different font formats. This leads to widely inconsistent font rendering and mishandling of popular (TrueType) fonts. First, there are 2 major ways to make fonts readable on low-DPI screens: - X-and-Y-fitting, as done on Windows for a long time before ClearType and DirectWrite. Glyph outlines are shuffled about (read: distorted) to fit them to the pixel grid. The goal is maximum sharpness at the expense of outline fidelity and glyph spacing. - Y-only-fitting: Done by ClearType, DirectWrite and Adobe's proprietary font rendering engine to exploit the RGB-subpixel-stripe configuration of modern LCDs. Outlines are only fitted to the Y-axis, so the rasterizer can use tricks ("subpixel rendering") on the X-axis to enhance contrast or perceived resolution. Since horizontal (X-axis) metrics are unchanged, glyph spacing stays as is. The higher the resolution (as in DPI) of a screen, the less important hinting/grid-fitting becomes. With the fontconfig property "autohint" set to false: - FreeType's TrueType (.ttf) engine will use the native hinting bytecode in the font. Depending on how much effort went into hinting the font and whether it was optimized for ClearType, glyphs might be grid-fitted to X-and-Y-axis or Y-axis only. ClearType is not yet fully handled by FreeType (2.6.1), so popular fonts from the Windows world will be more or less distorted. "Medium" seems to be a variant of "full". - the OpenType/CFF engine uses a different approach to rendering for low-DPI screens. Font designers of Type 1/CFF fonts just specify metadata that tell the hinting engine how to fit glyphs to the Y-axis (no X-fitting!), so the details of grid-fitting are deferred to the smarts of the hinting engine. "Medium" is equivalent to "full" here. - The Postscript/Type 1 engine is the predecessor to the CFF engine in spirit. Hinting works as with CFF. The Type 1 engine in FreeType is older than Adobe's contributed CFF engine and hinting results are of far lower quality. "Medium" is mostly "Full". - "Slight" will always trigger the autohinter regardless of font format. Y-fitting only. Since the computer world is comprised of more than one typeface and more than one font format, users will see jarringly inconsistent and distorted fonts with "medium" and "full" due to the differences in the engines and inconsistent quality of many typefaces in the wild. The problem is nicely visible when you go medium or full and mix font formats. A default installation of Fedora will have Cantarell in OpenType/CFF (.otf) format in the UI and DejaVu (.ttf) on the console. Cantarell is Y-fitted (and slightly emboldened), DejaVu X-and-Y-fitted. The difference is jarring. With the fontconfig property "autohint" set to true, FreeType's autohinter is triggered and native hinting disabled. "Slight" will fit to the Y-axis only, "medium" and "full" fit to X-and-Y-axes with differing strength and usually lower quality. From my testing, anything other than the autohinter on "slight" and the native CFF engine on "medium" or "full" will lead to inconsistent rendering and distortion. I recommend "slight" because the autohinter does a good and consistent job regardless of font format, the maintainer is also adding support for more scripts. Ubuntu has been using it for years. The future will soon bring high-DPI screens for the masses, and that's where Y-only-fitting as done by the slight autohinter and the CFF engine shines. Glyphs are rendered *much* cleaner and inter-glyph-spacing remains untouched. A lot of native hinting done on TrueType fonts, especially the X-and-Y variant, was made with low-DPI screens in mind and can look bad when applied on high-DPI screens. https://bugzilla.gnome.org/show_bug.cgi?id=756204
Diffstat (limited to 'data')
-rw-r--r--data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in.in
index 0687b052..0e6700cb 100644
--- a/data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in.in
@@ -11,9 +11,9 @@
<_description>The type of antialiasing to use when rendering fonts. Possible values are: "none" for no antialiasing, "grayscale" for standard grayscale antialiasing, and "rgba" for subpixel antialiasing (LCD screens only).</_description>
</key>
<key name="hinting" enum="org.gnome.settings-daemon.GsdFontHinting">
- <default>'medium'</default>
+ <default>'slight'</default>
<_summary>Hinting</_summary>
- <_description>The type of hinting to use when rendering fonts. Possible values are: "none" for no hinting, "slight" for basic, "medium" for moderate, and "full" for maximum hinting (may cause distortion of letter forms).</_description>
+ <_description>The type of hinting to use when rendering fonts. Possible values are: "none" for no hinting and "slight" for fitting only to the Y-axis like Microsoft's ClearType, DirectWrite and Adobe's proprietary font rendering engine. Ignores native hinting within the font, generates hints algorithmically. Used on Ubuntu by default. Recommended. The meaning of "medium" and "full" depends on the font format (.ttf, .otf, .pfa/.pfb) and the installed version of FreeType. They usually try to fit glyphs to both the X and the Y axis (except for .otf: Y-only). This can lead to distortion and/or inconsistent rendering depending on the quality of the font, the font format and the state of FreeType's font engines.</_description>
</key>
<key name="priority" type="i">
<default>0</default>