Font Question

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu May 18 17:10:28 EDT 2006


Thomas: MapServer deals only with integral SIZEs and WIDTHs. I know that's true with the GD driver where things are measured in pixels. GD has no concept of fractional width in its drawing routines. 

In your case you are using an unsupported parameter (WIDTH) in a label object and that's the reason for any error messages.

Steve

>>> Thomas Hammerlund <tom at MAPLINK.JP> 5/18/2006 2:47:06 AM >>>
Hello Everyone,

I have a question about font styling.  My style sheet is asking for a 
stroke-width of 0.5.  Do I set this up like a polygon with an outlinecolor 
of less than 1?  If so, does anyone know how to do that?

Here's my style sheet exerpt:
<xsl:template match= "svg/g[@id= 'p_eki_u']" >
     <g>
     <xsl:copy-of select="@*"/>

     <xsl:attribute name="style">stroke:#7F7F7F;stroke-width:0.4; 
fill:#E000A1;</xsl:attribute>

     <xsl:copy-of select="./*"/>
     </g>
     </xsl:template>

and my layer so far ...

  LAYER
  NAME c_eki_oh
  STATUS ON
  TILEINDEX "c_eki_oh_ix"
  TILEITEM "location"
  TYPE ANNOTATION
  LABELITEM "label"


  ###Z5
  CLASS
# MAXSCALE 20000 #Z5 MAX
# MINSCALE 16001  #Z5 MIN
    LABEL
       TYPE TRUETYPE
       MINDISTANCE 250
       FONT kochi-mincho
    SIZE 7.5
           COLOR 0 0 0
    #WIDTH 0.3
    POSITION AUTO
    ENCODING SJIS
           PARTIALS FALSE
    END
  END


  ###Z5
  CLASS
# MAXSCALE 20000 #Z5 MAX
# MINSCALE 16001  #Z5 MIN
    LABEL
       TYPE TRUETYPE
       MINDISTANCE 250
       FONT kochi-mincho
    SIZE 7.5
       COLOR 0 0 0
    #WIDTH 0.3
    POSITION AUTO
    ENCODING SJIS
           PARTIALS FALSE
    END
  END

 END

Uncommenting WIDTH crashes it.

Thank you in advance,
Tom 



More information about the mapserver-users mailing list