User reports some tools (KDE Control Center, Kvantum?) reformat our lines in fonts.conf, e.g.:
diff --git a/fonts.conf b/fonts.conf
index 50870eb..559e332 100644
--- a/fonts.conf
+++ b/fonts.conf
@@ -1,118 +1,84 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<?xml version='1.0'?>
+<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
-
-
- <description>The PixelPerfect setup for pretty web typography</description>
-
-
- <!-- Initial settings for both low DPI and high DPI screens.
+ <description>The PixelPerfect setup for pretty web typography</description>
+ <!-- Initial settings for both low DPI and high DPI screens.
This overwrites desktop settings from GNOME, KDE, etc.
Improved results are obtainable by tweaking as commented below. -->
-
- <!-- However, changing settings below is not recommended.
+ <!-- However, changing settings below is not recommended.
Although sub-pixel rendering increases resolution somewhat, it comes
with caveats. The coloured subpixels are visible for low resolutions
around 100 dpi, which can be bothersome (colours "bleeding" at the
edge of text). For high resolutions of at least 300 dpi, sub-pixel
rendering is not needed and can be detrimental, e.g. for mobile
devices, which are frequently rotated. And then there are bugs... -->
-
- <!-- WebKitGTK misbehaves with rgba/lcdfilter settings. FIXME -->
-
- <match target="font">
- <edit name="antialias" mode="assign">
- <bool>true</bool>
- </edit>
- </match>
- <!-- Keep autohinter off, well-hinted fonts are used. Also,
+ <!-- WebKitGTK misbehaves with rgba/lcdfilter settings. FIXME -->
+ <!-- Keep autohinter off, well-hinted fonts are used. Also,
FreeType's autohinter is incompatible with sub-pixel rendering. -->
- <match target="font">
- <edit name="autohint" mode="assign">
- <bool>false</bool>
- </edit>
- </match>
- <match target="font">
- <edit name="hinting" mode="assign">
- <bool>true</bool>
- </edit>
- </match>
- <match target="font">
- <edit name="hintstyle" mode="assign">
- <!-- Fonts that benefit from using BCI are set in hinting.conf. -->
- <const>hintslight</const>
- </edit>
- </match>
- <match target="font">
- <edit name="rgba" mode="assign">
- <!-- Use 'none' on CRTs, if your screen changes orientation often,
+ <match target="font">
+ <edit name="autohint" mode="assign">
+ <bool>false</bool>
+ </edit>
+ </match>
+ <match target="font">
+ <edit name="hintstyle" mode="assign">
+ <!-- Fonts that benefit from using BCI are set in hinting.conf. -->
+ <const>hintslight</const>
+ </edit>
+ </match>
+ <match target="font">
+ <edit name="rgba" mode="assign">
+ <!-- Use 'none' on CRTs, if your screen changes orientation often,
if you use multiple screens with different orientations, or if
DPI is so low that you can see the subpixel colors "bleeding".
Otherwise, probably 'rgb', but double-check by testing at
http://www.lagom.nl/lcd-test/subpixel.php to be sure. -->
- <!-- Doesn't really work with Wayland on FreeBSD? FIXME -->
- <!-- Chrome's PDF viewer always uses sub-pixel rendering. FIXME -->
- <const>none</const>
- </edit>
- </match>
- <match target="font">
- <edit name="lcdfilter" mode="assign">
- <!-- Use 'lcdnone' on CRTs or if you rotate your display regularly.
+ <!-- Doesn't really work with Wayland on FreeBSD? FIXME -->
+ <!-- Chrome's PDF viewer always uses sub-pixel rendering. FIXME -->
+ <const>none</const>
+ </edit>
+ </match>
+ <match target="font">
+ <edit name="lcdfilter" mode="assign">
+ <!-- Use 'lcdnone' on CRTs or if you rotate your display regularly.
Otherwise, probably 'lcddefault' on regular LCD screens.
Beware that 'lcdlegacy' can exhibit really bad color fringes
if glyphs are not extremely well hinted to the pixel grid.
(So it only works well if high-quality hinted fonts are used.)
Choose at http://www.spasche.net/files/lcdfiltering/, but make
sure to use an RGB display if using an LCD to test this. -->
- <const>lcddefault</const>
- </edit>
- </match>
-
-
- <!-- The order of included configuration files is significant. -->
-
- <!-- BUGS:
+ <const>lcddefault</const>
+ </edit>
+ </match>
+ <!-- The order of included configuration files is significant. -->
+ <!-- BUGS:
Using <accept> for aliases doesn't work with Chrome. FIXME#1
Firefox doesn't load local fonts for some sites. FIXME#2
WebKitGTK only matches first option in a font stack. FIXME#3 -->
-
-
- <!-- Common *initial* sets of rules for both loDPI and hiDPI screens -->
-
- <!-- Some minor generic fixes. -->
- <include prefix="xdg">fontconfig/fixes.conf</include>
- <!-- OS-specific rules. No harm if enabled on others. -->
- <include prefix="xdg">fontconfig/os.conf</include>
-
-
- <!-- Rules for low DPI screens only -->
-
- <!-- Settings and aliases for low DPI screens, covering "web safe" fonts,
+ <!-- Common *initial* sets of rules for both loDPI and hiDPI screens -->
+ <!-- Some minor generic fixes. -->
+ <include prefix="xdg">fontconfig/fixes.conf</include>
+ <!-- OS-specific rules. No harm if enabled on others. -->
+ <include prefix="xdg">fontconfig/os.conf</include>
+ <!-- Rules for low DPI screens only -->
+ <!-- Settings and aliases for low DPI screens, covering "web safe" fonts,
<include prefix="xdg">fontconfig/lodpi.conf</include> -->
- <!-- Sets the most appropriate type of hinting for selected typefaces.
+ <!-- Sets the most appropriate type of hinting for selected typefaces.
Causes bleeding for heavily hinted fonts with subpixel rendering.
<include prefix="xdg">fontconfig/hinting.conf</include> -->
- <!-- Disables antialiasing for fonts perfectly hinted at specific sizes.
+ <!-- Disables antialiasing for fonts perfectly hinted at specific sizes.
This makes text sharp at small sizes, at the cost of metrics.
<include prefix="xdg">fontconfig/pixelperfect.conf</include> -->
- <!-- Blacklists common typefaces that are not that well hinted. This way,
+ <!-- Blacklists common typefaces that are not that well hinted. This way,
perfectly hinted fonts are used more, e.g. as font-family fallbacks.
<include prefix="xdg">fontconfig/blacklists.conf</include> -->
-
-
- <!-- Rules for high DPI screens only -->
-
- <!-- Settings & aliases for high DPI screens, covering "web safe" fonts. -->
- <include prefix="xdg">fontconfig/hidpi.conf</include>
-
-
- <!-- Common *final* sets of rules for both loDPI and hiDPI screens -->
-
- <!-- Less important aliases common to both low DPI and high DPI screens. -->
- <include prefix="xdg">fontconfig/common.conf</include>
-
-
- <!-- Useful links:
+ <!-- Rules for high DPI screens only -->
+ <!-- Settings & aliases for high DPI screens, covering "web safe" fonts. -->
+ <include prefix="xdg">fontconfig/hidpi.conf</include>
+ <!-- Common *final* sets of rules for both loDPI and hiDPI screens -->
+ <!-- Less important aliases common to both low DPI and high DPI screens. -->
+ <include prefix="xdg">fontconfig/common.conf</include>
+ <!-- Useful links:
To learn of "web safe" fonts:
https://fonts.google.com/knowledge/glossary/system_font_web_safe_font
@@ -138,6 +104,9 @@
https://www.calculators.tech/dpi-calculator
-->
-
-
+ <match target="font">
+ <edit name="antialias" mode="assign">
+ <bool>true</bool>
+ </edit>
+ </match>
</fontconfig>
User reports some tools (KDE Control Center, Kvantum?) reformat our lines in
fonts.conf
, e.g.: