Adjust the default fontconfig fonts.conf to avoid selecting bitmap

fonts included as part of X11 that are also included as scalable fonts
as part of macOS.

Many websites will attempt to select these fonts, which results in
very strange, poor quality rendering.

This should keep legacy X11 applications that want the old "Helvetica"
and "Times" fonts working, but prevent them from being selected by
applications that want scalable fonts.

It should not prevent "Helvetica" or "Times" from being selected
if the user installs a scalable version.
This commit is contained in:
nia 2020-10-05 09:16:26 +00:00
parent a89c197148
commit 81cc2aabb6
1 changed files with 27 additions and 0 deletions

View File

@ -65,6 +65,33 @@
</edit>
</match>
<!--
Reject X11 bitmap fonts which may be selected in place of scalable
proportional fonts, e.g. on the web.
Mostly these are included as scalable system fonts in macOS.
-->
<selectfont>
<rejectfont>
<pattern>
<patelt name="family"><string>Charter</string></patelt>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
<pattern>
<patelt name="family"><string>Courier</string></patelt>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
<pattern>
<patelt name="family"><string>Helvetica</string></patelt>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
<pattern>
<patelt name="family"><string>Times</string></patelt>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
<!--
Load local system customization file
-->