Re: RE: Specifying location of fontfiles in fonts.conf file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rupa Kamoji wrote:
Hello,

Thanks for your reply. I need to ship the fontconfig library, fonts.conf
file and font files with my application. I want to avoid the requirement
of modification to any of the files by the recipient of my application.
He sets an environment variable and uses this env variable to run my
application. So I want to mention the location of font files in
fonts.conf file using this env variable. So this way he will not have to
do anything but at that same time he will be able to use fontcong for
all text display in my application.

Please help me in using this env variable in fonts.conf file to specify
the location of font files.

The code does not presently support the use of arbitrary environment variables and I'm not sure if there might be any security implications from doing so.

However, if you want your shipped copy of fontconfig to use an environment variable, then you can write a quick and dirty hack to, for instance, FcConfigAddDir. Add something like the following lines:

	if (strcmp(d, "$CUSTOM_FONT_DIR") == 0)
		d = (FcChar8 *) getenv ("CUSTOM_FONT_DIR");

I think that'll work for your case.

pat

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux