Fixing MS or webcore font display issues.
Posted 03-09-2017 at 12:41 AM by kingbeowulf
Updated 04-09-2017 at 09:40 PM by kingbeowulf (clarifications)
Updated 04-09-2017 at 09:40 PM by kingbeowulf (clarifications)
There are numerous threads on LQ and elsewhere on how to pretty up fonts on Linux. However, I one thing has still bothered me for years: on some web sites the font rendering looked jagged despite using a system or downloaded font, sometimes a fallback font family, that looked fine elsewhere. It didn't matter which browser was used and sometimes affected LibreOffice, etc.
As it turns out, Microsoft fonts look jagged because Freetype, the font rendering engine used by Linux, takes into account by default the embedded bitmaps inside these fonts. These bitmaps are created to improve the font appearance with Windows’ font rendering at small font sizes. This includes fonts such as Calibri, and the other webcore fonts (see Slackbuilds.org for example). Freetype sometimes tries to use these bitmaps at all sizes.
Now, had I read the README for the SBo webcore fonts, this would not have been a surprise. However, the comment there was misleading and caused me to think that the bitmaps would be turned ON not OFF by default if I added this XML snippet. Nope.
/etc/fonts/local.conf
or
$HOME/config/fontconfig/local.conf
and specifically this snippet:
Also, don't forget to recompile to add subpixel hinting in slackware/l/freetype!
As it turns out, Microsoft fonts look jagged because Freetype, the font rendering engine used by Linux, takes into account by default the embedded bitmaps inside these fonts. These bitmaps are created to improve the font appearance with Windows’ font rendering at small font sizes. This includes fonts such as Calibri, and the other webcore fonts (see Slackbuilds.org for example). Freetype sometimes tries to use these bitmaps at all sizes.
Now, had I read the README for the SBo webcore fonts, this would not have been a surprise. However, the comment there was misleading and caused me to think that the bitmaps would be turned ON not OFF by default if I added this XML snippet. Nope.
/etc/fonts/local.conf
or
$HOME/config/fontconfig/local.conf
and specifically this snippet:
Code:
<match target="font" > <edit name="embeddedbitmap" mode="assign"> <bool>false</bool> </edit> </match>
Total Comments 0