[mapserver-users] Font rendering in MapServer 6.0

Brad Posthumus posthumusb at AGR.GC.CA
Wed Jul 6 16:41:57 EDT 2011


We're in the process of upgrading from MapServer 5.4 to 6.0 and, after
following the migration guide from 5.4->5.6->6.0, almost everything is
working fine. The one exception is truetype font rendering. Text in 6.0
doesn't render well - it's blocky and distorted. Has anyone encountered this
change in their MapServer upgrade? 

Here's an example of a legend request in 5.4:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/legend_5_4.png 

and the same legend request in 6.0:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/legend_6_0.png 

This result is using the following legend definition for both:

  LEGEND
    STATUS ON
    KEYSIZE 19 14
    KEYSPACING 6 4
    LABEL
      TYPE truetype
      FONT "arial"
      SIZE 10
    END
    TEMPLATE "../htdocs/legendTemplate.html"
  END

In a WMS request, the result is blockier with a broken outline and larger
text. Using 5.4:

http://osgeo-org.1803224.n2.nabble.com/file/n6555935/wms_5_4.png 

and 6.0:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/wms_6_0.png 

...using this label definition in each of the layer classes:

      LABEL
        TYPE TRUETYPE
        FONT [FONTNAME_M] 
        SIZE [FONTSIZE]       
        POSITION cc
        ANTIALIAS FALSE
        FORCE TRUE
        COLOR 0 0 0
        OUTLINECOLOR 255 255 235
      END

I should point out we have included "DEFRESOLUTION 72" in the MAP section
which fixed our vector rendering, and the only reason why the city symbols
are larger in the 6.0 screenshot is that they're also based on a font.



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-tp6555935p6555935.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list