[Fontconfig] Query for unknown font with spacing=mono returns sans-serif font

Christian Weiske cweiske at cweiske.de
Wed Nov 10 12:06:12 UTC 2021


Hello Akira,


Thank you for replying.

>> But poppler also sends the hint to fontconfig that it wants a
>> monospaced font ("$ fc-match RFont3:spacing=mono").
>> Shouldn't fontconfig use that hint and return a monospaced font?
> 
> In theory, yes. We may need similar things for :spacing=charcell and
> :spacing=dual too.

Should that be solved with a configuration file like the following (that 
is shipped by default with fontconfig), or should that be handled 
internally somehow?

----
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
     <match target="pattern">
      <test name="spacing">
       <int>100</int>
      </test>
      <edit name="family" mode="prepend">
       <string>monospace</string>
      </edit>
     </match>
</fontconfig>
----


-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-


More information about the Fontconfig mailing list