Actually do nothing in fontconfig for that. how invoking APIs in FreeType depends on applications that takes care of those properties. fontconfig just manages and defines those properties and provides turning on/off through API. so if you want to see how it actually behaves, better checking applications/libraries.
Ah okay. I couldn't quite reproduce my findings after I reset my conf.d to mostly defaults. Oh well.
By the way, I attach my first attempt at providing per-font-configuration. Please have a look.
Should you include them, I recommend installing 10-otf-hintnative.conf, 10-pfab-hintauto.conf and 10-ttf-hintauto.conf as the default. This will result in Y-axis-only fitting out of the box, like Microsoft's ClearType, DirectWrite and Adobe's proprietary font engine.
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how TrueType fonts (commonly .ttf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use native hints supplied by the font. TrueType fonts can be natively fitted to either the Y-axis only (ClearType) or to both X-and-Y axes (pre-ClearType). What you get depends on the font and the installed version of FreeType. Note that "autohint" is set to 'false'. Setting it to 'true' enables the autohinter that ignores native hints and changes the meaning of 'hintfull' and 'hintmedium' to automatic X-and-Y-fitting. --> <match target="font"> <test name="fontformat"> <string>TrueType</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintfull</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how Type 1 or Postscript fonts (commonly .pfa or .pfb) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use native hints supplied by the font. FreeType will therefore fit glyphs on the Y-axis only, like Microsoft's ClearType, DirectWrite and Adobe's proprietary engine. For your information: Type 1 or Postscript fonts are not meant to be natively fitted to the X-and-Y-axes like it's possible for TrueType fonts. Note that "autohint" is set to 'false'. Setting it to 'true' enables the autohinter that ignores native hints and changes the meaning of 'hintfull' and 'hintmedium' to automatic X-and-Y-fitting. --> <match target="font"> <test name="fontformat"> <string>Type 1</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintfull</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how OpenType/CFF fonts (commonly .otf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use native hints supplied by the font. FreeType will therefore fit glyphs on the Y-axis only, like Microsoft's ClearType, DirectWrite and Adobe's proprietary engine. For your information: OpenType/CFF fonts are not meant to be natively fitted to the X-and-Y-axes like it's possible for TrueType fonts. Note that "autohint" is set to 'false'. Setting it to 'true' enables the autohinter that ignores native hints and changes the meaning of 'hintfull' and 'hintmedium' to automatic X-and-Y-fitting. --> <match target="font"> <test name="fontformat"> <string>CFF</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintfull</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how OpenType/CFF fonts (commonly .otf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use the autohinter. It ignores native hints in a font and algorithmically generates its' own. FreeType's autohinter has two "hintstyle" modes: - hintslight: Only fit a font to the Y-axis like Microsoft's ClearType, DirectWrite and Adobe's proprietary font engine. This is a compromise between outline fidelity and sharpness. - hintmedium/hintfull: Fit a font to the X-and-Y axis similar to what's been done on Windows before ClearType. This configuration defaults to 'hintslight' because it works reasonably well across different scripts and on both low-DPI and high-DPI screens. --> <match target="font"> <test name="fontformat"> <string>CFF</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how TrueType fonts (commonly .ttf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use the autohinter. It ignores native hints in a font and algorithmically generates its' own. FreeType's autohinter has two "hintstyle" modes: - hintslight: Only fit a font to the Y-axis like Microsoft's ClearType, DirectWrite and Adobe's proprietary font engine. This is a compromise between outline fidelity and sharpness. - hintmedium/hintfull: Fit a font to the X-and-Y axis similar to what's been done on Windows before ClearType. This configuration defaults to 'hintslight' because it works reasonably well across different scripts and on both low-DPI and high-DPI screens. --> <match target="font"> <test name="fontformat"> <string>TrueType</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how Type 1 or Postscript fonts (commonly .pfa or .pfb) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to use the autohinter. It ignores native hints in a font and algorithmically generates its' own. FreeType's autohinter has two "hintstyle" modes: - hintslight: Only fit a font to the Y-axis like Microsoft's ClearType, DirectWrite and Adobe's proprietary font engine. This is a compromise between outline fidelity and sharpness. - hintmedium/hintfull: Fit a font to the X-and-Y axis similar to what's been done on Windows before ClearType. This configuration defaults to 'hintslight' because it works reasonably well across different scripts and on both low-DPI and high-DPI screens. --> <match target="font"> <test name="fontformat"> <string>Type 1</string> </test> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how OpenType/CFF fonts (commonly .otf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to do no grid-fitting at all. This is basically what's done on Apple's Mac OS X. Note that "autohint" is set to 'false' and "hintstyle" to 'hintnone'. Changing those might trigger the autohinter depending on how the rendering library interprets this configuration. --> <match target="font"> <test name="fontformat"> <string>CFF</string> </test> <edit mode="assign" name="hinting"> <bool>false</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintnone</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how TrueType fonts (commonly .ttf) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to do no grid-fitting at all. This is basically what's done on Apple's Mac OS X. Note that "autohint" is set to 'false' and "hintstyle" to 'hintnone'. Changing those might trigger the autohinter depending on how the rendering library interprets this configuration. --> <match target="font"> <test name="fontformat"> <string>TrueType</string> </test> <edit mode="assign" name="hinting"> <bool>false</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintnone</const> </edit> </match> </fontconfig>
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- This configuration file controls how Type 1 or Postscript fonts (commonly .pfa and .pfb) are fitted to the pixel grid ("hinted"). In practice, this configuration tells rendering libraries like cairo to tell FreeType to do no grid-fitting at all. This is basically what's done on Apple's Mac OS X. Note that "autohint" is set to 'false' and "hintstyle" to 'hintnone'. Changing those might trigger the autohinter depending on how the rendering library interprets this configuration. --> <match target="font"> <test name="fontformat"> <string>Type 1</string> </test> <edit mode="assign" name="hinting"> <bool>false</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintnone</const> </edit> </match> </fontconfig>
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig