[Fontconfig] Including/excluding fonts from the configuration

Keith Packard fontconfig@fontconfig.org
Fri, 18 Apr 2003 10:36:46 -0700

Now that FreeType handles .pcf.gz fonts, fontconfig users are about to see 
a dramatic increase in the number of (ugly) bitmap fonts available.

Fontconfig 2.2 "works around" this by excluding the X bitmap font 
directories from the default configuration (users can explicitly add them 
back in if desired).

For fontconfig 2.3, I've considered several possible mechanisms to allow
users to edit the set of available fonts, and I've implemented one of them
which is designed to be efficient, rather than completely general:


File and directory names are matched against all of the 'acceptfont' globs 
and the 'rejectfont' globs.  Those in 'rejectfont' but not 'acceptfont' 
are not added to the configuration; they will not be available for selection 
or listing.  A rejected directory excludes any fonts in that or inferior 

Globbing ignores '.' and '/' for matching purposes; matching is done on 
the complete path name.

This example includes all of the fonts from the 'misc' directory but 
excludes all other .pcf fonts (compresed or not).

I made the <acceptfont> syntax general enough so we could add additional 
kinds of matching (perhaps based on font patterns) if desired.

To get some testing of this functionality, I'm planning on releasing a 
2.2.90 (2.3 rc0) at approximately the same time as 2.2.0.