[Fontconfig] fontconfig match question

Stephen C. North north at research.att.com
Sun Jul 16 05:29:18 PDT 2006

Greetings.  We use fontconfig in Graphviz.  Before we did this,
we had some simple rules to bind fonts by names to system font
files.  Obviously fontconfig improves this greatly, but we also
want to report to a human when the match has, for all practical
purposes, failed.  For example, the user may specify a font
that does not exist locally, or we may have misconfigured fontconfig
or made an error in Graphviz itself.  

fontconfig silently fails over to some default.  How can we tell
when this happens and warn the user?

Very recently I noticed that the 'default' font in Graphviz was
a sans-serif font, not Times (which it has been for years).
This turned out to be a logic error on our part, but we strongly
feel that if the user asks for XYZ font and basically there is
no such thing locally, we ought to be able to provide a warning.

How can we do this?

Stephen North

More information about the Fontconfig mailing list