Add a configuration to switch to monospace if spacing=100 is requested
Previously, requesting a monospace font with an invalid font family (for instance, when a font is not embedded in a PDF, poppler may issue such queries), the font family would be filled by configuration file 49-sansserrif.conf with sans-serif This new rule set the family to monospace if spacing=100 is specified in the query.
This commit is contained in:
parent
7b09c81dab
commit
3fcdd60a1d
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Add mono to the family when no generic name and spacing is 100</description>
|
||||
<!--
|
||||
If the font has no generic name and spacing 100, add mono
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>serif</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>monospace</string>
|
||||
</test>
|
||||
<test qual="all" name="spacing" compare="eq">
|
||||
<int>100</int>
|
||||
</test>
|
||||
<edit name="family" mode="append_last">
|
||||
<string>monospace</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
Loading…
Reference in New Issue