[Mapserver-users] True-type font issues

Richard Greenwood rich at greenwoodmap.com
Fri May 28 15:41:03 EDT 2004

Adam Quiney wrote:

> Hello all,
> I've searched for this item on both the mailing list and google, but 
> haven't found anything that solves the problem - I'm getting this error 
> message when using both a mapfile we have set up, and a mapfile from the 
> MapServer 4.0 tutorial:
> msGetLabelSize(): TrueType Font error. Could not find/open font
> I have tried copying the fonts to multiple directories in the htdocs 
> root, but to no effect.  I know that the fonts.list file is being read 
> correctly.  The fonts file we are using looks like:
> arial            arial.ttf
> The file provided by the tutorial is similar but contains many more fonts.
> I have tried changing the arial.ttf filename to include a relative path, 
> an absolute path (using both forward slashes one time and backward 
> slashes the next time) all to no avail.
> The system I am running on is a Windows 2000 machine.
> Any help or suggestions would be greatly appreciated.
> --Adam

Two things that might help:
1. The font names are case sensitive (even on Windows).
2. Put the font.list in the same directory as the fonts themselves. Then 
in your map file put the full path to the font.list in a FONTSET 
definition. For example:
   FONTSET "/www/htdocs/mapserver/fonts/font.list"
This is a path to a file in the file system, not an http path. But use 
forward slashes (/) even on Windows.

Richard Greenwood

More information about the mapserver-users mailing list