Rupa Kamoji
2006-Apr-12  06:16 UTC
[Fontconfig] RE: Specifying location of fontfiles in fonts.conf file.
Hello,
 
Thanks a looooot for your inputs. I tried this on Solaris and it
worked!!!
 
Now I am trying the same on linux. I could do the configuration of
fontconfig successfully. But to my bad luck, I am getting below error
during compilation.
 
 
make[2]: Entering directory
`/LinuxDisk/usr/home/rkamoji/TEMP/fc_linux/fc-lang''
source=''../../fontconfig-2.2.96/fc-lang/fc-lang.c''
object=''fc-lang.o''
libtool=no \
depfile=''.deps/fc-lang.Po''
tmpdepfile=''.deps/fc-lang.TPo'' \
depmode=gcc /bin/sh ../../fontconfig-2.2.96/depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../fontconfig-2.2.96/fc-lang -I..
-I../../fontconfig-2.2.96/src -I../../fontconfig-2.2.96
-I/usr/include/freetype2 -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations     -Wnested-externs
-fno-strict-aliasing    -g -O2 -c `test -f
''../../fontconfig-2.2.96/fc-lang/fc-lang.c'' || echo
''../../fontconfig-2.2.96/fc-lang/''`../../fontconfig-2.2.96/fc-lang/fc-la
ng.c
In file included from
../../fontconfig-2.2.96/fontconfig/fcfreetype.h:27,
                 from ../../fontconfig-2.2.96/src/fcint.h:39,
                 from ../../fontconfig-2.2.96/fc-lang/fc-lang.c:25:
/usr/local/include/ft2build.h:56: freetype/config/ftheader.h: No such
file or directory
In file included from ../../fontconfig-2.2.96/src/fcint.h:39,
                 from ../../fontconfig-2.2.96/fc-lang/fc-lang.c:25:
../../fontconfig-2.2.96/fontconfig/fcfreetype.h:28: `#include'' expects
"FILENAME" or <FILENAME>
make[2]: *** [fc-lang.o] Error 1
make[2]: Leaving directory
`/LinuxDisk/usr/home/rkamoji/TEMP/fc_linux/fc-lang''
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/LinuxDisk/usr/home/rkamoji/TEMP/fc_linux''
make: *** [all] Error 2
 
 
Configuration of my linux system is as below:
 
XFree86 : 4.5.0 (latest version).
OS: Redhat 7.1
 
When I installed XFree86 : 4.5.0, fontconfig, freetype and xft all were
installed by XFree86 only. Where should I keep fontconfig source code?
How can I make freetype and other required libs/includes available to
fontconfig?
 
Thanks for your valuable inputs.
 
Thanks and Regards,
Rupa.
 
 
-----Original Message-----
From: Patrick Lam [mailto:plam@MIT.EDU] 
Sent: Wednesday, April 12, 2006 10:17 AM
To: Rupa Kamoji
Cc: fontconfig@lists.freedesktop.org
Subject: Re: [Fontconfig] RE: Specifying location of fontfiles in
fonts.conf file.
 
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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.freedesktop.org/archives/fontconfig/attachments/20060412/41017c1d/attachment.html
Patrick Lam
2006-Apr-12  06:38 UTC
[Fontconfig] RE: Specifying location of fontfiles in fonts.conf file.
Rupa Kamoji wrote:> Configuration of my linux system is as below: > > > > XFree86 : 4.5.0 (latest version). > > OS: Redhat 7.1 > > > > When I installed XFree86 : 4.5.0, fontconfig, freetype and xft all were > installed by XFree86 only. Where should I keep fontconfig source code? > How can I make freetype and other required libs/includes available to > fontconfig?XFree86 4.5.0 is far from being the latest version; it was released in March 2005. And you''re using an ancient fontconfig and RedHat version. But anyway, you have to install the freetype-devel package: http://dir.filewatcher.com/d/RedHat/7.1/i386/System%20Environment/Libraries/freetype-devel-2.0.1-4.i386.rpm.367769.html pat