How do you get or use fontsets

Trond Michelsen trondmm-mapserver at CRUSADERS.NO
Sat Jul 1 01:40:10 PDT 2006


On Fri, Jun 30, 2006 at 01:40:25PM -0700, Albert Anderson wrote:
> Where Do I put the tff's at.

Wherever you want.

> In var/www/htdocs/fonts in the fonts?

If you want.

> where my fontset.txt is?

If you use relative paths, they are considered to be relative to the
location of the fontset.

>  I put
>  arial       var/www/htdocs/fonts/arial.ttf
>  arial-bd    var/www/htdocs/fonts/arialbd.tff
 
> in the fontset.txt and it still shows up the error message
> msGetLabelSize(): TrueType Font error. Requested font (arialbd) not
> found.  I'm I putting something in the wrong place?

Well, there are three things that could be wrong here.

First, you're requesting a font that hasn't been defined. Your
fontset.txt defines "arial" and "arial-bd", while your mapfile
requests "arialbd". 

Second, the "arial-bd" definition points to a file ending in .tff,
while I'm pretty sure it's supposed to end in .ttf

Finally, you are using relative paths, and my guess is that this isn't
what you wanted. Try to change the fontlist to this:

arial       /var/www/htdocs/fonts/arial.ttf
arial-bd    /var/www/htdocs/fonts/arialbd.tff

If you want to test if your paths are correct, here's what you do:

First go to the directory where the fontlist is. If the fontlist is
/var/www/htdocs/fontset.txt , do this:

  cd /var/www/htdocs

then check each font from the fontlist with ls, like this:

  ls -l var/www/htdocs/fonts/arial.ttf
  ls -l var/www/htdocs/fonts/arialbd.tff

If these commands doesn't find any files, your paths are wrong, and
mapserver won't find the fonts either. 


-- 
Trond Michelsen



More information about the MapServer-users mailing list