(intermittent) poor text quality on ANNOTATION layers

Hal Mueller hal at MOBILEGEOGRAPHICS.COM
Wed Nov 8 18:15:34 PST 2006


I have long had a nuisance-level problem with the quality of TrueType 
font text, where sometimes a label will appear fuzzy, as if it is 
being drawn twice, one or two pixels apart.  When I upgraded to 4.10 
last week the problem became much worse, so I am trying to fix it.

I have tried lots of variations in my mapfile, but I still end up 
with text that causes headaches.  I would appreciate any suggestions.

I suspect that I am tickling some boundary condition in the antialiasing code.

An example can be seen at
http://www.sailwx.info/shiptrack/shiplocations.phtml?lat=40&lon=-72&radius=100

If I switch to primary colors (e.g. 255 0 0), quality is much 
improved.  If I use a white background (BACKGROUNDCOLOR 255 255 255), 
quality is perfect.  It makes no difference whether I use JPEG, PNG, 
or GIF output.  I am using only default drivers--haven't tried things 
like DRIVER "GDAL/JPEG" yet, nor have I tinkered with IMAGEMODE.

Here's a sample CLASS definition:
                 CLASS
                         LABEL
                                 BUFFER 1
                                 ANTIALIAS TRUE
                                 COLOR 156 156 156
#                               BACKGROUNDCOLOR 255 255 255
                                 FONT "OptimaItalic"
                                 SIZE 3
                                 MAXSIZE 10
                                 MINSIZE 8
                                 Type truetype
                                 POSITION AUTO
                         END
                 END

I'm running 4.10 on a Redhat box.  Library versions:
gdlib 2.0.33
freetype 2.1.10
gdal 1.3.1
MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I guess the next thing I try is picking other colors for 
text/land/sea, but before I do that I'd like to hear ideas on things 
I can try with the image model or other parts of the system.

TIA,
Hal



More information about the MapServer-users mailing list