[Mapserver-users] TrueType fonts problem -- help needed

Frieso ter Haseborg ter-haseborg at sf-datentechnik.de
Mon Nov 10 09:38:45 EST 2003


Hi,

there should be no difference between a mapfile for direct-use in MS
and a mapfile used with MS/mapscript. IMHO you should check your php for
the problem first (post the relevant part of the code too, if the
problem continues). 

=> Do you execute the drawLabelCache-method (e.g. map->drawLabelCache (
$image ))?

Don't forget the cc to the list!

HTH,
Frieso

>-----Original Message-----
>From: Murat Isik [mailto:muratisik at megatek.com.tr]
>Sent: Monday, November 10, 2003 3:22 PM
>To: Frieso ter Haseborg
>Subject: Re: [Mapserver-users] TrueType fonts problem -- help needed
>
>
>Thank you for your reply.
>after my last mail, I have started to play around with labelling and
>achieved good results with mapserver.
>However when I copy the related layer's part from mapserver map file to
>mapscripts mapfile, it first stopped rendering. then I added 
>the CLASSITEM
>'ID' line and it started to produce image without labels. Can 
>you please
>help me? I am stuck...
>
>original layer from mapscript mapfile:
>LAYER
>  NAME ERENKOY_ORNEKSOKAK_PL_polyline
>  GROUP sokaklar
>  TYPE line
>  DATA ERENKOY_ORNEKSOKAK_PL_polyline
>  STATUS ON
>  CLASSITEM 'ID'
>  CLASS
>        EXPRESSION /./
>   COLOR 66 34 249
>  END
>
>END
>
>instead of the above I copied this and labelling did not work:
>
>LAYER
>  NAME ERENKOY_ORNEKSOKAK_PL_polyline
>  TYPE line
>  GROUP sokaklar
>  STATUS ON
>  DATA ERENKOY_ORNEKSOKAK_PL_polyline
>
>CLASSITEM 'ID'
>  CLASS
>       EXPRESSION /./
>  COLOR 66 34 249
>  END
>#LABELCACHE on
>LABELITEM 'ADI'
>  CLASS
>   NAME 'ADI'
>   COLOR 161 02 110
>    LABEL
>      TYPE truetype
>#      FORCE true
>      FONT arial
>      COLOR 0 0 0
>       ANGLE AUTO
>     BACKGROUNDCOLOR 250 250 250 #WIT
>      POSITION AUTO
>        SIZE 0
>        MINSIZE 2
>      SIZE 8
>   END
>  END
>
>Should I do something with the php part too?
>
>Have a nice day:)
>
>Murat Isik
>
>
>
>----- Original Message -----
>From: "Frieso ter Haseborg" <ter-haseborg at sf-datentechnik.de>
>To: "Murat Isik" <muratisik at megatek.com.tr>
>Cc: <mapserver-users at lists.gis.umn.edu>
>Sent: Monday, November 10, 2003 12:06 PM
>Subject: RE: [Mapserver-users] TrueType fonts problem -- help needed
>
>
>> Hi,
>>
>> try to use an absolute path in your "fonts.list".
>>
>> HTH,
>>
>> Frieso ter Haseborg
>> - Software Development -
>>
>> --
>>
>> --------------------------------------------------
>> S&F Datentechnik GmbH&Co.KG
>> Reimersstr. 41b
>> 26789 Leer, Germany
>>
>> -----Original Message-----
>> From: Murat Isik [mailto:muratisik at megatek.com.tr]
>> Sent: Monday, November 10, 2003 10:27 AM
>> To: mapserver-users at lists.gis.umn.edu
>> Subject: [Mapserver-users] TrueType fonts problem -- help needed
>>
>>
>> Hello,
>> I am having a problem with TrueType fonts. This is the error I get:
>>
>> msGetLabelSize(): TrueType Font error. Could not find/open font
>>
>> And this is what I do to get this error:
>>
>> I have these in my mapfile:
>>
>> NAME ERENKOY
>> STATUS ON
>> SIZE 600 600
>> SHAPEPATH "data"
>> IMAGECOLOR 255 255 255
>> FONTSET font.list
>>
>> and
>>
>> LAYER
>>   NAME ERENKOY_ORNEKSOKAK_PL_polyline
>>   TYPE LINE
>>   GROUP sokaklar
>>   STATUS ON
>>   DATA ERENKOY_ORNEKSOKAK_PL_polyline
>>   LABELITEM "ADI"
>>   CLASS
>>     NAME "ADI"
>>     COLOR 161 02 110
>>     LABEL
>>       TYPE truetype
>>       FORCE true
>>       FONT arial
>>       COLOR 0 0 0
>>       BACKGROUNDCOLOR 250 250 250
>>       POSITION cc
>>       SIZE 8
>>     END
>>   END
>> END
>>
>>
>> This ERENKOY_ORNEKSOKAK_PL_polyline layer's dbf file includes two
>> coloumns, ID and ADI (name). This is a street layer and I am 
>trying to
>> get the name of the streets written next to their lines.
>>
>> font.list include:
>>
>> arial                           arial.ttf
>> arial-bold                      arialbd.ttf
>> arial-italic                    ariali.ttf
>> arial-bold-italic               arialbi.ttf
>>
>> I have all the related ttf files in the same directory as font.list
>> text, mapfile and the html page calling these fonts. However 
>I get the
>> error. May it be that my mapserver is not truetype compiled? I must
>> admit that I installed mapserver and mapscript through rpms so I dont
>> know the trutype situation of my mapserver 3.6. If I can get this
>> labelling to work then I am going to use th same mapfile for 
>a mapscript
>> page.
>>
>> Have a nice day.
>>
>> Murat Isik
>>
>>
>>
>>
>
>
>




More information about the mapserver-users mailing list