[Fontconfig] WIN32 questions

Tor Lillqvist tml at iki.fi
Thu Jan 21 13:33:32 PST 2010


> Here is the wired in config file locations ehich don't mean a lot to WIN32
>   /etc/fonts/fonts.conf
>   /etc/fonts/fonts.dtd
>   /etc/fonts/conf.d

Of course not, and indeed they aren't used. The src/Makefile.am passes
-DFONTCONFIG_PATH='"$(CONFDIR)"' but then in fccfg.c you see

#if defined (_WIN32)

static FcChar8 fontconfig_path[1000] = "";

(Code to initialise fontconfig_path once with a path that reflects the
location of the fontconfig DLL)

#undef FONTCONFIG_PATH
#define FONTCONFIG_PATH fontconfig_path

#endif

And thus the code in FcConfigGetPath() uses that variable instead of a
hardcoded literal string to construct the pathname.

>   ~/.fonts.conf

Unless the environment variable HOME exists (it usually doesn't on
Windows), on Windows the '~' is expanded to the value of the
environment variable USERPROFILE, which normally exists. So that
should work. But OK, it would be cleaner to use a directory relative
to the per-user AppData directory and not a "dot" directory, as an
initial period has no traditional significance on Windows.

--tml


More information about the Fontconfig mailing list