msGetLabelSize() : Could not find/open font {Scanned} {Scanned}

Siki Zoltan siki at AGT.BME.HU
Mon Jan 22 11:26:46 PST 2007


Hi,

1. Try to remove (TrueType) from your font set file.
2. Use slash instead of backslash in the path in the font set file even on 
   Windows

for example
Arial C:/WINDOWS/Fonts/ARIAL.TTF

Bye,
Zoltan

On Mon, 22 Jan 2007, Aude Allain wrote:

> Hello, 
> 
> I'm trying to display labels on my map, but I get the following error :
> : msGetLabelSize(): Could not find/open font. 
> 
> I defined a FONTSET FILE in the mapfile which contains font paths :
> FONTSET   "../font/fontset.txt"
> 
> Content of fontset.txt : 
> 
> Arial (TrueType) C:\WINDOWS\Fonts\ARIAL.TTF
> 
> And, the layer on which I want to see the labels is defined in the
> mapfile : 
> 
> LAYER 
> 
>             NAME         " A0"
> 
>               CONNECTIONTYPE oraclespatial      
> 
>             CONNECTION  "user at bd/pwd"
> 
>             DATA "GEOM FROM MN_A0 USING UNIQUE ID SRID 8307 "
> 
>             STATUS       DEFAULT
> 
>             TYPE         POLYGON
> 
>             MINSCALE       150
> 
>             MAXSCALE    500
> 
>             GROUP "Administratif"
> 
>             TOLERANCE    100
> 
>             TOLERANCEUNITS pixels
> 
>             LABELITEM "NAME"
> 
>             LABELCACHE on
> 
>             CLASS
> 
>                 NAME                      "Pays - A0"       
> 
>                 COLOR        255 216 176
> 
>                 OUTLINECOLOR 32 32 32
> 
>                 TEMPLATE "ttt_query.html"
> 
>                 LABEL
> 
>                          MINFEATURESIZE 1
> 
>                         MINDISTANCE 1
> 
>                         POSITION CC
> 
>                         TYPE TRUETYPE
> 
>                         FONT "Arial"
> 
>                         SIZE 12
> 
>                        ANTIALIAS TRUE
> 
>                        COLOR 0 0 0
> 
>                         OUTLINECOLOR 255 255 255
> 
>                 END
> 
>             END
> 
>             
> 
> END # A0
> 
>  
> 
>  
> 
> The font named 'Arial' is in c:/Windows/font. 
> 
>  
> 
> On the Web, it is said to check the Apache user or mapserver has
> permission to access the font file and the ttf files. But I don't know
> how to do that. 
> 
>  
> 
> Could you hep me ? 
> 
>  
> 
> I use : 
> 
> -          windows xp
> 
> -          ms4w : php/mapscript 4.10, apache 2, php5.2
> 
> -          Oracle spatial 10g
> 
>  
> 
>  
> 
> Aude
> 
>  
> 
> 



More information about the MapServer-users mailing list