[Fontconfig] rule to exclude certain fonts based on file type and name scheme

Fabian Greffrath fabian at greffrath.com
Tue Sep 3 00:08:09 PDT 2013


Hi Raimund,

thank you for your insightful reply!

Am Montag, den 02.09.2013, 17:46 +0200 schrieb Raimund Steger: 
>    <selectfont>
>      <rejectfont>
>        <glob>/usr/share/fonts/X11/Type1/cour*</glob>
>        <glob>/usr/share/fonts/X11/Type1/UT*</glob>
>      </rejectfont>
>    </selectfont>

Unfortunately, that is not possible. The fonts are all in the same
directory and do only have their first letter in the file name in
common.

> <match target="scan">
>    <test name="family" compare="contains">
>      <string>Courier</string>
>    </test>
>    <test name="fontformat"><string>Type 1</string></test>
>    <edit name="family" mode="assign">
>      <string>__DISABLED_FONT__</string>
>    </edit>
> </match>

Would it be possible to exclude them with the folowing rule then?

<selectfont>
  <rejectfont>
   <pattern>
     <patelt name="family"><string>__DISABLED_FONT__</string></patelt>
   </pattern>
  </rejectfont>
</selectfont>

- Fabian




More information about the Fontconfig mailing list