[Mapserver-users] TrueType Font and Label Angle

Pericles Nacionales nacional at cbs.umn.edu
Mon Jan 13 13:13:29 PST 2003


Larry,

Did you try compiling GD and MapServer with the same freetype version?
I usually compile mine with version 1.3.1 and everything works just fine.
Here's what I do to compile Freetype 1.3.1 with MapServer: 
./configure --enable-force-freetype1 --with-gd=static,../gd-1.8.4 ...

Then I edit the resulting Makefile and make sure that the GD line
contains "-DUSE_GD_TTF", and NOT "-DUSE_GD_FT".

As for GD, I compile my own version and link it statically to MapServer.
I just make sure to edit GD's Makefile and use -DHAVE_LIBTTF (and -lttf)
instead of -DHAVE_LIBFREETYPE (and -lfreetype).

I don't know if all these have  anything to do with labels getting screwed
up but I've never had issues with Truetype fonts this way.

By the way, I use Gentoo Linux and Lycoris Desktop/LX.  I don't have
Redhat 8 but I know my Lycoris binaries work properly on it (having used
it for a workshop at JPL).

Good luck!
-Perry N.

On Mon, 13 Jan 2003, Ellenbecker, Larry wrote:

> List,
> 
> I'm trying to get true type fonts working with my application on Linux.  The
> application is up a running on both Linux and NT.  True type fonts are
> working just fine on NT, but on Linux I've had the following problems.  My
> application is straight CGI.
> 
> System Specs:  RedHat 7.0  with freetype-1..3.1. freetype-2.1.2, gd-2.0.9
> and mapserver-3.6.1.
> 
> 		After compiling and installing both freetype fonts and GD,
> I compiled mapsever and got the msGetLabelSize(): Could not find/open font.
> Initaially my application was sitting at:
> 
> 		/var/www/html/simple  with  simple.map FONSET
> fonts/fonts.txt
> 
> 		When I moved my fonts directory to /var/www/html/fonts and
> changed simple.map FONSET ../fonts/fonts.txt I was able to use true type
> font arial in my application.  I then ran into the next issue with Label
> Angle.  I couldn't get the labels to follow the appropriate line orientation
> as it does on my NT version.  I researched the list and found Jonathan
> Lowe's "line layer label angle changes(solved)" .  I've tried to follow
> these directions but am still unable to get the labels to plot with the
> correct orientation of the line.   The BUFFER, BACKGROUNDSHADOWSIZE AND
> BACKGROUNDCOLOR   create a background box oriented in the appropriate
> position but the text doesn't hit the background box.
> 
> 		Has anyone got a sure fire method for resolving truetype
> label angle problems - I'd sure appreciate any assistance.
> 
> 		Larry L. Ellenbecker
> 		GIS Systems Analyst
> 		Winnebago County
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 




More information about the MapServer-users mailing list