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

Raimund Steger rs at mytum.de
Sun Sep 2 02:41:02 PDT 2012


Helmut Tessarek 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?

Having objects make any assumptions about the location in the file 
system they're stored in would be very uncommon on Unix. I. e. there is 
no POSIX equivalent of Win32's GetModuleFileName.

That said, there are some (not 100% reliable) workarounds like 
http://stackoverflow.com/questions/2605427. The question is, should 
fontconfig resort to these. I'd rather say not, it's not good style for 
a portable general-purpose library.

However, maybe Akira will consider it as a non-default configuration 
option if you send a patch :-)

Raimund

-- 
Worringer Str 31, Duesseldorf 40211 Germany   home: <rs at mytum.de>
+49-179-2981632 icq 16845346                  work: <rs at interface-ag.de>


More information about the Fontconfig mailing list