[mapserver-users] Font support in php_mapscript + mapserver

Daniel Morissette morissette at dmsolutions.ca
Tue May 7 16:22:43 EDT 2002


I've noticed this kind of problem on some machines where I recompiled
gd-1.8.4 with Freetype2... it seems that for some reason GD is unable to
load fonts with that configuration.  I found that recompiling GD (and
then PHP MapScript) with freetype1.3 resolves the issue... I don't
really know why, I just know that freetype 1.3 seems to work more
easily.

Note that if your system has both Freetype 1.3 and Freetype 2.x
installed then you'll have to tell MapServer's configure to look for
Freetype 1.3 in priority using --enable-force-freetype1 ... otherwise it
will detect Freetype2 in priority and do the wrong thing.

Daniel



Gleydson Mazioli da Silva wrote:
> 
> Hi all,
> 
> I'm trying to add the php_mapscript extensions support to mapserver, and when I try to run the
> gmap application, I got the following error message:
> 
> "Warning: MapServer Error in msGetLabelSize(): Could not find/open font in /var/www/gmap/htdocs/gmap75.php3 on line 530"
> 
> The program phpinfo_mapscript.phtml, returns the following about php_mapscript support:
> 
> "MapScript Version ($Revision: 1.106 $ $Date: 2002/05/06 13:06:16 $)
> MapServer version 3.6 (development) OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE"
> 
> My compilation options are the following:
> 
> mapserver (lastest CVS repository)
> 
> --with-gd=static,../gd-1.8.4 --with-proj=/usr --with-ogr=../gdal-1.1.7/ogr --with-gdal=../gdal-1.1.7/apps/gdal-config
> --with-wmsclient --with-php=/usr/src/geop/php4-4.0.6 --with-freetype=/usr
> 
> gd 1.8.4
> ./configure --enable-freetype2=/usr
> 
> php 4.0.6
> 
> --with-calendar --without-ttf --with-t1lib=shared,/usr --enable-memory-limit --enable-sysvsem --enable-sysvshm
> --enable-track-vars --enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db2 --with-iconv --with-ndbm
> --enable-exif --enable-filepro --enable-ftp --with-gettext --enable-mbstring -with-pcre-regex=/usr --enable-shmop
> --enable-sockets --with-xml=/usr --with-expat-dir=/usr --enable-yp --with-zlib --prefix=/usr --with-regex=system
> --disable-rpath --disable-static --with-layout=GNU --with-zlib-dir=/usr --with-jpeg-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 --with-png-dir=shared,/usr --with-freetype-dir= --enable-xslt --with-xslt-sablot=shared,/usr
> 
> Related with gd, I've added the flag -DHAVE_LIBFREETYPE and -I include options in Makefile to get it compiled on
> Debian.
> 
> I've tried many ways to solve that, but from this point without luck.
> 
> Thanks in advanced
> 
> Gleydson Mazioli da Silva
> -------------------------
> gleydson at debian.org
> gleydson at cipsga.org.br



More information about the mapserver-users mailing list