(intermittent) poor text quality on ANNOTATION layers

Steve Lime Steve.Lime at DNR.STATE.MN.US
Wed Nov 8 20:25:38 PST 2006


Ugh, that's not good is it. Can you share the full mapfile (perhaps with
all but the offending layer stripped out, but the header portion
intact)? For some reason I think I've seen this before, recently, but I
can't remember where.

The other thing to look at is your PHP code. It's like the label cache
is being rendered twice, not being cleared between draws or something
like that. I notice you also have some collisions so I don't think this
is an antialiasing problem.

Steve

>>> Hal Mueller <hal at MOBILEGEOGRAPHICS.COM> 11/08/06 8:15 PM >>>
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