[Mapserver-users] Working with TrueType Fonts

Calin D. NITU calin at internetgids.be
Tue Jan 14 11:24:37 EST 2003


I am trying to display a True Type font. My map file looks like:

    map
    extent 76952.80 189962.49 92359.36 202061.55
    name "test 2"
    shapepath "data"
    size 600 450
    status on
    fontset 'font/fonts.txt'
    units meters
     ........
     ........
     LAYER
        NAME roads_name_init
        GROUP "roads"
        DATA "roads"
        MINSCALE 5000
        STATUS ON
        TYPE ANNOTATION
        LABELCACHE ON
        LABELITEM "NUMBER"
        CLASS
           LABEL
              TYPE truetype
              FONT fritqat
             MINFEATURESIZE AUTO
             MINDISTANCE 100
             ANTIALIAS TRUE
             COLOR 0 0 0
             OUTLINECOLOR 220 220 220
             SIZE 11
             ANGLE AUTO
             POSITION AUTO
             OFFSET 0 2
              buffer 2
          END #LABEL
       END #CLASS
END #LAYER ROADS-NAME

I created a directory called FONT under the directory where it is the
'*.map' file
Here I put all the TTF files and I created a list with the fonts - named
FONTS.TXT:
        fritqat                     fritqat.ttf
        fritqat-bold             fritqtb0.ttf
        fritqat-italic             fritqti0.ttf
        fritqat-bold-italic     fritqtb2.ttf


 The error that I get is
           -  "MapServer Error in msGetLabelSize(): Could not find/open font
in <the PHP file>....." - with PHP environment
           -  "msGetLabelSize(): TrueType Font error. Could not find/open
font"       - with clasic HTML

We are using the stabile version of MAPSERVER 3.6.

Thank you,
Calin




More information about the mapserver-users mailing list