[mapserver-users] Compiling TrueType -- A solutions :-)
klehr1@tampabay.rr.com
klehr1@tampabay.rr.com
Fri, 8 Mar 2002 21:17:11 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0158_01C1C6E6.9CD0EC80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This has been added to the wiki....
Compiling True Type Fonts with Mapserver 3.5=20
I needed to compile the gd libraries with true type libraries to enable =
rotating text
on maps.
My box is Red Hat Linux 6.1 compiled with no X windows capabilities. =20
Note on my RH 7.2 box, the gd library already has true type compiled in, =
so it works
automatically. rpm-1.8.3-7
Process obtain freetype-1.3.1 and gd-1.8.4 compile both, then recompile =
mapserv 3.5 (sounds easy)
True Type --
download freetype-1.3.1.gz
tar -xvzf freetype-1.3.1.gz
cd freetype-1.3.1
./configure --without-x =20
make
make blew out, as it was trying to compile some things in the test =
directory=20
causing it to link in the X11 library, I edited the makefile and removed =
the=20
lines where it was cd'ing into the test subdirectory and removed the=20
compilation of test in the all: line.
make
su
make install
----------------------
GD
download gd-1.8.4.gz
tar gd-1.8.4.gz
cd gd-1.8.4
vi Makefile
CFLAGS=3D-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBTTF =
LIBS=3D-lgd -lpng -lz -ljpeg -lm -lttf
INCLUDEDIRS=3D-I. -I/usr/include/X11 -I/usr/X11R6/include/X11 =
-I/usr/local/include -I/www/stevestuff/freetype-1.3.1/lib=20
LIBDIRS=3D-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib =
-L/www/stevestuff/freetype-1.3.1/lib=20
# I know I said I dont have X, guess I was to lazy to remove it =
here,=20
# note how you need to reference your freetype from above
make
----------------------
Last steps recompile Mapserver 3.5
./configure --with-gd=3Dstatic,/www/stevestuff/gd-1.8.4
# note Stephan suggested=20
# ./configure --with-gd=3Dstatic,/www/stevestuff/gd-1.8.4 --with-ttf =
--enable-force- freetype1 =20
# BUT I had blown away all the freetype 2.x yesterday, so not a factor =
for me.
make
Make ran into some problems it picked up /usr/local/libgd.a and then it =
picked
up shared objects libgd.so libgd.so.1 lbgd.so.1.2 from =
/usr/local/lib=20
(I renamed libgd.a to libgd.a.old and moved the so's to the old =
directory)
So I did a make clean, then remade and all was fine
./mapserv -v
./mapserv: error in loading shared libraries: libttf.so.2: cannot open =
shared ob
ject file: No such file or directory =20
Note its complaining that the included shared library is not findable =
libttf.so.2
As root, I had to edit /etc/ld.so.conf adding in the line the path to my =
libtff libraries, i.e. /usr/local/lib save file then run /sbin/ldconfig
su=20
vi /etc/ld.so.conf # add /usr/local/lib
/sbin/ldconfig
./mapserv -v=20
MapServer version 3.5 OUTPUT=3DPNG OUTPUT=3DJPEG OUTPUT=3DWBMP =
SUPPORTS=3DTTF INPUT=3DTIFF
INPUT=3DEPPL7 INPUT=3DJPEG INPUT=3DSHAPEFILE =
=20
And now I have true type fonts working. =20
Thanks to Steve Lime, Stephan Kafka, Daniel Morissette, and Richard =
Greenwood for=20
their suggestions and help. Rich -- your suggestion on freetype-2.X =
probably worked,
by I had the shared object problem and did not recognize it at the time
about /etc/ld.so.conf.
Cheers and now I can sleep.
Steve Lehr
WebDatabaseSolutions.com
------=_NextPart_000_0158_01C1C6E6.9CD0EC80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>
<DIV><FONT size=3D2>This has been added to the wiki....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>Compiling True Type Fonts with Mapserver 3.5 =
</FONT></DIV><PRE>I needed to compile the gd libraries with true type =
libraries to enable rotating text
on maps.
My box is Red Hat Linux 6.1 compiled with no X windows capabilities. =20
Note on my RH 7.2 box, the gd library already has true type compiled in, =
so it works
automatically. rpm-1.8.3-7
Process obtain freetype-1.3.1 and gd-1.8.4 compile both, then recompile =
mapserv 3.5 (sounds easy)
True Type --
download freetype-1.3.1.gz
tar -xvzf freetype-1.3.1.gz
cd freetype-1.3.1
./configure --without-x =20
make
make blew out, as it was trying to compile some things in the test =
directory=20
causing it to link in the X11 library, I edited the makefile and removed =
the=20
lines where it was cd'ing into the test subdirectory and removed the=20
compilation of test in the all: line.
make
su
make install
----------------------
GD
download gd-1.8.4.gz
tar gd-1.8.4.gz
cd gd-1.8.4
vi Makefile
CFLAGS=3D-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBTTF =
LIBS=3D-lgd -lpng -lz -ljpeg -lm -lttf
INCLUDEDIRS=3D-I. -I/usr/include/X11 -I/usr/X11R6/include/X11 =
-I/usr/local/include -I/www/stevestuff/freetype-1.3.1/lib=20
LIBDIRS=3D-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib =
-L/www/stevestuff/freetype-1.3.1/lib=20
# I know I said I dont have X, guess I was to lazy to remove it =
here,=20
# note how you need to reference your freetype from above
make
----------------------
Last steps recompile Mapserver 3.5
./configure --with-gd=3Dstatic,/www/stevestuff/gd-1.8.4
# note Stephan suggested=20
# ./configure --with-gd=3Dstatic,/www/stevestuff/gd-1.8.4 --with-ttf =
--enable-force- freetype1 =20
# BUT I had blown away all the freetype 2.x yesterday, so not a factor =
for me.
make
Make ran into some problems it picked up /usr/local/libgd.a and then it =
picked
up shared objects libgd.so libgd.so.1 lbgd.so.1.2 from =
/usr/local/lib=20
(I renamed libgd.a to libgd.a.old and moved the so's to the old =
directory)
So I did a make clean, then remade and all was fine
./mapserv -v
./mapserv: error in loading shared libraries: libttf.so.2: cannot open =
shared ob
ject file: No such file or directory =20
Note its complaining that the included shared library is not findable =
libttf.so.2
As root, I had to edit /etc/ld.so.conf adding in the line the path to my =
libtff libraries, i.e. /usr/local/lib save file then run /sbin/ldconfig
su=20
vi /etc/ld.so.conf # add /usr/local/lib
/sbin/ldconfig
./mapserv -v=20
MapServer version 3.5 OUTPUT=3DPNG OUTPUT=3DJPEG OUTPUT=3DWBMP =
SUPPORTS=3DTTF INPUT=3DTIFF
INPUT=3DEPPL7 INPUT=3DJPEG INPUT=3DSHAPEFILE =
=20
<FONT size=3D2>And now I have true type fonts working. =
</FONT></PRE><PRE><FONT size=3D2></FONT> </PRE><PRE><FONT =
size=3D2>Thanks to Steve Lime, Stephan Kafka, Daniel Morissette, and =
Richard Greenwood for </FONT></PRE><PRE><FONT size=3D2>their suggestions =
and help. Rich -- your suggestion on freetype-2.X probably =
worked,</FONT></PRE><PRE><FONT size=3D2>by I had the shared object =
problem and did not recognize it at the time</FONT></PRE><PRE><FONT =
size=3D2>about /etc/ld.so.conf.</FONT></PRE>
<DIV> </DIV>
<DIV><FONT size=3D2>Cheers and now I can sleep.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>Steve Lehr</FONT></DIV><FONT size=3D2>
<DIV>WebDatabaseSolutions.com</FONT></FONT></DIV></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0158_01C1C6E6.9CD0EC80--