Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2027 closed defect (fixed)

Truetype font outlines buggered starting with Mapserver 4.10.0

Reported by: sroberts@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.10
Severity: major Keywords:
Cc: a.pintado@…

Description

Starting with Mapserver 4.10.0 truetype font outlines appear to be broken. Each
character outline now shows up as multiple outlines offset randomly, making it
difficult to read the text or interpret symbols. Truetype font outlines worked
fine with Mapserver 4.8.4. Here is a sample mapfile demonstrating the problem:

MAP
  SIZE 500 200
  EXTENT 0 0 100 100
  FONTSET "{path to fonts}/fonts/fonts.list"
  IMAGECOLOR 0 0 0

  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE RGB
    EXTENSION "png"
  END
  PROJECTION
      "proj=latlong"
  END

  LAYER
    TYPE ANNOTATION
    FEATURE
      POINTS 50 65 END
    END
    STATUS DEFAULT
    CLASS
      TEXT "TRUETYPE FONT;Mapserver-4.10.0"
      LABEL
        TYPE TRUETYPE
        FONT courier
        SIZE 35
        POSITION CC
        COLOR 255 0 0
        OUTLINECOLOR 255 255 255
        WRAP ';'
      END
    END
  END
END

Attachments (2)

mapserv-4.8.4.png (15.3 KB ) - added by sroberts@… 15 years ago.
Example using Mapserver 4.8.4, this is OK
mapserv-4.10.0.png (22.8 KB ) - added by sroberts@… 15 years ago.
Example using Mapserver 4.10.0, text outline has problems.

Download all attachments as: .zip

Change History (8)

by sroberts@…, 15 years ago

Attachment: mapserv-4.8.4.png added

Example using Mapserver 4.8.4, this is OK

by sroberts@…, 15 years ago

Attachment: mapserv-4.10.0.png added

Example using Mapserver 4.10.0, text outline has problems.

comment:1 by sdlime, 15 years ago

Yup, that FUBAR. I've not seen the same problems with any of my 4.10 
applications. What versions of GD and Freetype are you using?

Steve

comment:2 by sroberts@…, 15 years ago

I tried both gd-2.0.33 and gd-2.0.34, freetype-2.3.1 and the version included
with the Redhat distribution(libfreetype.so.6.3.7). Makes no difference. I'm
building both mapserver 4.8.4 and 4.10.0 identically using the same versions of
dependent software. Version 4.8.4 works fine but 4.10.0 does not. Did you try
using my test mapfile? And did it work for you? The problem is not obvious if
you are using small fonts so could the problem be there but you just overlooked
it?? The problem is particularly troublesome to me since I'm using a large ship
outline symbol to plot the location of a ship and starting with version 4.10.0
the ship is no longer recognizable. I'm using this font in a label so could it
have something to do with maplabel.c? I've noticed you made a lot of changes to
this file since mapserver 4.8.4 to support curved labels.

-Steve

comment:3 by sdlime, 15 years ago

Status: newassigned
I can confim the bug on my end. I'm puzzled why this hasn't been noticed 
before. Perhaps since folks don't often render 35pt text. For example, if you 
reduce your size to 10 you don't see the effect, but larger and you do. All my 
4.10 interfaces stick to relatively small text sizes.

I suspect the problem is in mapgd.c since that's where the outline is applied.

Working on it, should be an easy one (I hope)...

Steve

comment:4 by sdlime, 15 years ago

Resolution: fixed
Status: assignedclosed
Ok, found the problem. I suspect this cropped in when some other changes were 
contributed by a third-party and I simply didn't scrutinize them closely 
enough. I have fixed the error in 4.10 branch and CVS HEAD...

Steve

comment:5 by sdlime, 15 years ago

Cc: a.pintado@… added

comment:6 by sdlime, 15 years ago

*** Bug 2029 has been marked as a duplicate of this bug. ***
Note: See TracTickets for help on using tickets.