[Fontconfig] distribute font with application

James Cloos cloos at jhcloos.com
Tue Jul 31 09:42:58 PDT 2007

>>>>> "Peter" == Peter Shinners <peters at imageworks.com> writes:

Peter> How can an application add extra "font" directories at startup?
Peter> Is there an environment variable that allows adding directories
Peter> to the fontconfig search path?

Check out the function FcConfigAppFontAddDir().

It lets you add a directory of application-specific fonts to the config.
There is also FcConfigAppFontAdd() to add a single font file.

They are mentioned in fontconfig(3) and also in the fontconfig-devel

I am not familiar with how Qt interacts with fontconfig.  There may be
something in the Qt api to call those, or you may have to do so manually.

I'd take a look thru the Qt src for where it calls FcInit(),
FcInitLoadConfig() and/or FcInitLoadConfigAndFonts().

James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

More information about the Fontconfig mailing list