[mapserver-users] Problem with truetype labelling in php mapscript
Daniel Morissette
morissette at dmsolutions.ca
Mon Jul 29 19:56:33 PDT 2002
Dylan,
My experience is that when I compile my own GD with freetype2 then it
doesn't seem to work well, you get errors about being unable to load
fonts if they use a relative filename I think, hence the note that you
saw on the Wiki page. If you use the GD that came preinstalled with
RedHat then you may have more luck... I think the RH7.1 version of GD
uses freetype2 and worked well with MapServer, so I suggest that you try
that first.
About the FAQ on the gdttf.c conflict, it dates from the pre-3.5 days
and doesn't apply any more since MapServer now uses the native TTF
support in the GD library... this obsolete FAQ should be taken out of
the phpmapscript-install-howto document.
HTH,
Daniel
Dylan Rawlins wrote:
>
> Hi,
>
> I experienced a problem in displaying truetype labels under php
> mapscript 3.5 and was advised to upgrade to 3.6.1. We have now
> upgraded but are experiencing the same problem. By changing the
> labels to bitmaps the system works perfectly so we have narrowed
> the problem down to the Freetype compilation.
>
> We are experiencing difficulties in installing the older freetype
> libraries on the server (as described in
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptRH72):
>
> .. edit Makefile to compile with Freetype1... Mapscript seems to
> have problem loading fonts when using gd compiled with Freetype2
> on RH7.x ...
>
> Our current server configuration is as follows:
>
> Linux version 2.4.9-31
> Red Hat Linux release 7.1 (Seawolf)
> Apache/1.3.19 (Unix)
> PHP/4.2.1 and PHP/4.0.6 (used by Ensim)
> freetype-2.0.1-4
> gd-1.8.3-7
>
> Installing the older gd and freetype1 libraries is causing
> dependencies problems with our existing PHP installation (not only
> PHP 4.2.1, but also PHP 4.0.6 which is being used by the Ensim
> control panel).
>
> I've also found the following:
>
> http://mapserver.gis.umn.edu/doc/phpmapscript-install-howto.html
>
> Q: Why can't both PHP and MapScript be compiled with Freetype
> support?
>
> A: You cannot have Freetype enabled in both PHP and MapServer
> because of a conflict with the gdttf.c and gdcache.c files that are
> included in both PHP and MapServer but are not identical. We may
> try to fix that conflict in the future, but in the meantime, one of PHP
> or MapServer has to be compiled using --without-ttf. This is
> especially important with PHP4 because it includes TTF support by
> default.
>
> This brings us back to the fact that Mapscript/Mapserver does not
> seem to be simple to install when it is used in conjunction with
> PHP 4.x on a Linux server.
>
> So it seems that Mapscript does not work with Freetype2, is this
> correct? Any advice on what I can do to enable Truetype labelling?
>
> Many thanks
> Dylan
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list