[Fontconfig] how to read config file from current dir (relative to a binary using the lib)
Helmut Tessarek
ml at evermeet.cx
Tue Sep 4 12:20:06 PDT 2012
On 04.09.12 14:28 , Raimund Steger wrote:
> Hmm, if there is no system fontconfig on OSX it would seem only fair to
> include something analogous to the existing DllMain in fccfg.c, where
> FONTCONFIG_PATH defaults to ../etc/fonts relative to the binary if the latter
> is in a directory called "lib" or "bin". After all the API you mentioned seems
> to be pretty standard on that platform. Then ffmpeg wouldn't have an issue,
> right?
I agree. That's the reason why I started this entire thread. Although I'd
rather see some sort of a search order.
You could make this a configurable option.
--enable-relative-path[=PATH] defaults to ./fonts/
e.g.
/path/to/binary
If fontconfig was configured with above option, you would look for the
fonts.conf file in /path/to/binary/fonts
If nothing is found there, you can still look for the file in --sysconfdir
and/or /etc/fonts.
I'm not really sure why fontconfig has to look for the file in only one place
anyway...
Cheers,
Helmut
More information about the Fontconfig
mailing list