[Fontconfig] how to read config file from current dir (relative to a binary using the lib)

Akira TAGOH akira at tagoh.org
Sun Sep 2 19:25:44 PDT 2012


On Sun, Sep 2, 2012 at 5:22 AM, Helmut Tessarek <ml at evermeet.cx> wrote:
>> How can I make fontconfig look for the config files in the local directory?
>
> After going through the entire mail thread again...
>
> Don't you think, it might be a good idea to give fontconfig the option to
> search in ./fontconfig/ first, before looking in PREFIX/etc or --sysconfdir?

I agree with Raimund on it. for default behavior, adding _current
path_ to the path prefix to search wouldn't be a good idea as we
usually don't add it to $PATH for security concerns.

Though fontconfig tries to find something out from $FONTCONFIG_PATH if
the directory is an relative path. so if you have
<include>conf.d</include> in your fonts.conf and run something with
FONTCONFIG_PATH=. may read the rules under ./conf.d. but I don't
recommend to do so except for testing purpose.

-- 
Akira TAGOH


More information about the Fontconfig mailing list