error FONTSET

Graham Davis gdavis at REFRACTIONS.NET
Wed May 10 13:53:10 EDT 2006


Hi B,

Things look correct in your setup.  You might want to try having the 
fontset.txt and all the font files in the same directory.  I'm not sure 
if this is necessary but it is usually how I set things up.  Also ensure 
the permission settings for the font files allows mapserver to read 
them.  That is all I can see to try.  Hope it helps,

-- 
Graham Davis
Refractions Research Inc.
gdavis at refractions.net



B Tuttle wrote:

> Hi-
> I am having a similar problem, but I think my fonts are correctly
> located and referenced (possibly I am wrong about htis since I keep
> getting the error message). I haven't had any responses to my post
> yet. All the info is below any chance you know what is wrong with mine
> as well?
> ================================================
> Hi-
> I am new to this and trying to set up my first map server on a linux
> box. When I try to use trutype font labels for my legend I get the
> following error:
> msGetLabelSize(): TrueType Font error. Requested font (courier) not 
> found.
>
> This also occurs if I change the font to say arial:
> msGetLabelSize(): TrueType Font error. Requested font (arial) not found.
>
> My legend is as follows:
> LEGEND
>     STATUS on
>     IMAGECOLOR 230 230 230
>     LABEL
>          TYPE truetype
>          FONT "courier"
>          COLOR 0 0 0
>          SIZE 10
>          ANTIALIAS true
>     END
> END
>
> Commenting out TYPE and FONT and changing SIZE to small gets rid of
> the error. I am not sure if this is a typo, permissions, path, or some
> other issue. My fontset.txt, and an ls of the font directory and my
> map file are below. Any help would be appreciated.
> ======================================
> [root at localhost home]# ls /usr/share/fonts/webcore/
> andalemo.ttf  courbd.ttf     georgiai.ttf  tahomabd.ttf  trebucit.ttf
> arialbd.ttf   courbi.ttf     georgia.ttf   tahoma.ttf    trebuc.ttf
> arialbi.ttf   couri.ttf      georgiaz.ttf  timesbd.ttf   verdanab.ttf
> ariali.ttf    cour.ttf       impact.ttf    timesbi.ttf   verdanai.ttf
> arial.ttf     fonts.cache-1  l_10646.ttf   timesi.ttf    verdana.ttf
> ariblk.ttf    fonts.dir      lucon.ttf     times.ttf     verdanaz.ttf
> comicbd.ttf   fonts.scale    micross.ttf   trebucbd.ttf  webdings.ttf
> comic.ttf     georgiab.ttf   symbol.ttf    trebucbi.ttf  wingding.ttf
> [root at localhost home]
> ======================================
>      arial                           /usr/share/fonts/webcore/arial.ttf
>      arial-bold                      /usr/share/fonts/webcore/arialbd.ttf
>      arial-italic                    /usr/share/fonts/webcore/ariali.ttf
>      arial-bold-italic               /usr/share/fonts/webcore/arialbi.ttf
>      arial_black                     /usr/share/fonts/webcore/ariblk.ttf
>      comic_sans                      /usr/share/fonts/webcore/comic.ttf
>      comic_sans-bold                 /usr/share/fonts/webcore/comicbd.ttf
>      courier                         /usr/share/fonts/webcore/cour.ttf
>      courier-bold                    /usr/share/fonts/webcore/courbd.ttf
>      courier-italic                  /usr/share/fonts/webcore/couri.ttf
>      courier-bold-italic             /usr/share/fonts/webcore/courbi.ttf
>      georgia                         /usr/share/fonts/webcore/georgia.ttf
>      georgia-bold                    
> /usr/share/fonts/webcore/georgiab.ttf
>      georgia-italic                  
> /usr/share/fonts/webcore/georgiai.ttf
>      georgia-bold-italic             
> /usr/share/fonts/webcore/georgiaz.ttf
>      impact                          /usr/share/fonts/webcore/impact.ttf
>      monotype.com                    
> /usr/share/fonts/webcore/monotype.ttf
>      recreation_symbols              
> /usr/share/fonts/webcore/recreate.ttf
>      times                           /usr/share/fonts/webcore/times.ttf
>      times-bold                      /usr/share/fonts/webcore/timesbd.ttf
>      times-italic                    /usr/share/fonts/webcore/timesi.ttf
>      times-bold-italic               /usr/share/fonts/webcore/timesbi.ttf
>      trebuchet_ms                    /usr/share/fonts/webcore/trebuc.ttf
>      trebuchet_ms-bold               
> /usr/share/fonts/webcore/trebucbd.ttf
>      trebuchet_ms-italic             
> /usr/share/fonts/webcore/trebucit.ttf
>      trebuchet_ms-bold-italic        
> /usr/share/fonts/webcore/trebucbi.ttf
>      verdana                         /usr/share/fonts/webcore/verdana.ttf
>      verdana-bold                    
> /usr/share/fonts/webcore/verdanab.ttf
>      verdana-italic                  
> /usr/share/fonts/webcore/verdanai.ttf
>      verdana-bold-italic             
> /usr/share/fonts/webcore/verdanaz.ttf
> ======================================
> NAME "AppDesign3"
> UNITS meters
> SIZE 640 480
> IMAGECOLOR 255 255 255
> IMAGETYPE png
> SHAPEPATH "/data/"
> #Bottom left, upper right
> EXTENT 139732.562544 4093791.107191 763734.812496 4546455.000230
> FONTSET "/usr/local/apache2/htdocs/fontset.txt"
>
> WEB
>    HEADER "/usr/local/apache2/htdocs/appdesign3_web_header.html"
>    FOOTER "/usr/local/apache2/htdocs/appdesign3_web_footer.html"
>    EMPTY "/appdesign3_no_results.html"
>    TEMPLATE "/usr/local/apache2/htdocs/appdesign3.html"
>    IMAGEPATH "/usr/local/apache2/htdocs/tmp/"
>    IMAGEURL "/tmp/"
> END
>
> SYMBOL
>  NAME "triangle"
>  TYPE vector
>  POINTS
>    0 4
>    2 0
>    4 4
>    0 4
>  END
> END
>
> REFERENCE
>  IMAGE "/data/colorado_ref_map.gif"
>  SIZE 300 225
>  EXTENT 139732.562544 4093791.107191 763734.812496 4546455.000230
>  STATUS on
>  COLOR -1 -1 -1
>  OUTLINECOLOR 255 0 0
> END
>
> QUERYMAP
>  STATUS on
>  STYLE hilite
>  COLOR 255 0 0
>  SIZE 480 320
> END
>
> SCALEBAR
>     LABEL
>          COLOR 0 0 0
>          ANTIALIAS true
>          SIZE small
>     END
>     POSITION lr
>     INTERVALS 5
>     STATUS embed
>     SIZE 144 5
>     STYLE 0
>     UNITS miles
>     BACKGROUNDCOLOR 255 255 255
>     IMAGECOLOR 255 255 255
>     COLOR 0 0 0
>     OUTLINECOLOR 0 0 0
>     TRANSPARENT off
> END
>
> LEGEND
>     STATUS on
>     IMAGECOLOR 230 230 230
>     LABEL
>          TYPE truetype
>          FONT "courier"
>          COLOR 0 0 0
>          SIZE 10
>          #SIZE small
>          ANTIALIAS true
>     END
> END
>
>
> LAYER
>    NAME "USGS_Index"
>    STATUS on
>    TYPE polygon
>    CONNECTIONTYPE POSTGIS
>    CONNECTION "dbname=project1 user=postgres host=localhost port=5432"
>    DATA "the_geom from usgs_index"
>    HEADER "/usr/local/apache2/htdocs/appdesign3_index_header.html"
>    FOOTER "/usr/local/apache2/htdocs/appdesign3_index_footer.html"
>    TOLERANCE 100
>    TOLERANCEUNITS meters
>    LABELCACHE on
>    LABELITEM 'QUAD_NAME'
>    LABELMAXSCALE 250000
>    CLASS
>        NAME "USGS Index"
>        TEMPLATE "/usr/local/apache2/htdocs/appdesign3_index_query.html"
>        STYLE
>            OUTLINECOLOR 0 255 0
>        END
>        LABEL
>            COLOR 0 255 0
>            SIZE small
>         POSITION cc
>        END # label
>    END # class
> END # layer
>
> LAYER
>    NAME "Counties"
>    STATUS on
>    TYPE polygon
>    CONNECTIONTYPE POSTGIS
>    CONNECTION "dbname=project1 user=postgres host=localhost port=5432"
>    DATA "the_geom from counties"
>    LABELCACHE on
>    LABELITEM "CNTY_NAME"
>    LABELMINSCALE 250000
>    CLASS
>        NAME "Counties"
>        STYLE
>            SIZE 1
>            OUTLINECOLOR 0 0 255
>        END
>        LABEL
>            #MINFEATURESIZE auto
>            COLOR 0 0 255
>            SIZE small
>            POSITION cc
>        END # label
>    END # class
> END # layer
>
> LAYER
>    NAME "Cities"
>    STATUS on
>    TYPE point
>    CONNECTIONTYPE POSTGIS
>    CONNECTION "dbname=project1 user=postgres host=localhost port=5432"
>    DATA "the_geom from cities"
>    LABELCACHE on
>    LABELITEM "name"
>    LABELMAXSCALE 100000
>    MAXSCALE 1000000
>    CLASS
>        STYLE
>            COLOR  255 0 0
>            SYMBOL 'triangle'
>            SIZE 5
>        END
>        LABEL
>          COLOR 250 0 0
>          SIZE small
>          POSITION auto
>        END
>    END # class
> END # layer states
>
> LAYER
>    NAME "Highways"
>    STATUS on
>    TYPE line
>    CONNECTIONTYPE POSTGIS
>    CONNECTION "dbname=project1 user=postgres host=localhost port=5432"
>    DATA "the_geom from highways"
>    LABELCACHE on
>    #LABELITEM "ROUTE"
>    CLASS
>        NAME "Highways"
>        STYLE
>            SIZE 1
>            COLOR 0 0 0
>        END
>    #    LABEL
>    #        COLOR 0 0 0
>    #        SIZE small
>    #    END # label
>    END # class
> END # layer
>
> END # mapfile
>
> On 5/10/06, Graham Davis <gdavis at refractions.net> wrote:
>
>> Hello Eduardo,
>>
>> One of the fonts that you have listed in your map file is not located
>> where you have listed it.   In the future, please show us your MAP file
>> so that we can better help you.
>>
>> -- 
>> Graham Davis
>> Refractions Research Inc.
>> gdavis at refractions.net
>>
>>
>> Eduardo Arévalo wrote:
>>
>> > hello:  at the time of executing mapfile it leaves the following error
>> >
>> > msGetLabelSize(): TrueType Font error. Could not find/open font
>> >
>> > please help
>>
>



More information about the mapserver-users mailing list