[Fontconfig] TrueType scaled font rendering problem

Ben Smith ben.ellis.smith at gmail.com
Mon Aug 30 03:36:21 UTC 2021


Hi All,

I'm posting here after already raising the issue on the FreeType mailing
list.

The problem:
- LiberationMono-Regular.ttf rendered perfectly in Ubuntu 8, Ubuntu 10 and
Ubuntu 16, but terrible in Ubuntu 20.
- It is reproducible on recent versions of OpenSUSE and ArchLinux.
- It only applies in specific programs eg. xterm, xfontsel, likely others.

To reproduce:

1. Make sure /usr/fonts/truetype/liberation/ is a font dir
(mkfontscale;mkfontdir).
2. xset +fp /usr/fonts/truetype/liberation/
3. xterm -fn "-misc-liberation mono-medium-r-normal-*-*-*-*-*-*-*-*"
4. Observe terrible font (see screenshot comparison Ubuntu 16 vs latest
OpenSUSE)

Werner from the FreeType team had this to say:
"
It's definitely a bug in the X font setup: The font is treated as
either unhinted or autohinted and then rendered as a mono font.
FreeType doesn't support this.  Monochrome rendering (to be more
precise: bi-level rendering) of TrueType fonts in FreeType gives only
pleasant results for low resolutions if (a) the font contains proper
hints for B/W rendering, and (b) the v35 bytecode engine mode is used.
"

Cheers,
Ben

[image: Comparison.JPG]
[image: Comparison2.JPG]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20210830/902218e8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comparison.JPG
Type: image/jpeg
Size: 68200 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20210830/902218e8/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comparison2.JPG
Type: image/jpeg
Size: 76683 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20210830/902218e8/attachment-0003.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LiberationMono-Regular.zip
Type: application/x-zip-compressed
Size: 69430 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20210830/902218e8/attachment-0001.bin>


More information about the Fontconfig mailing list