[mapserver-dev] Letterspacing is different for polyline labels

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Jul 24 13:46:17 PDT 2012


+1 on the change (it'll bust a few regression tests...)

Steve

-----Original Message-----
From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Oliver Tonnhofer
Sent: Tuesday, July 24, 2012 9:34 AM
To: mapserver-dev at lists.osgeo.org
Subject: [mapserver-dev] Letterspacing is different for polyline labels

Hi,

while comparing the rendering of Mapnik and Mapserver I found out that the letter spacing of line labels is much larger with  Mapserver.

After diving into the source code, I found out that labels on a straight line are rendered differently than on curved lines. As mentioned in #4026, the inter-character spacing is defined in the font itself, but that spacing is multiplied by 1.25 when a label is rendered on a polyline. 
See: https://github.com/mapserver/mapserver/blob/master/mapprimitive.c#L1818


Here you can see how "Alter Wall" and "Neuer Wall" are rendered with different spacing. "Alter Wall" is on a straight line, while "Neuer Wall" is on a curved line.
https://dl.dropbox.com/u/2633201/issues/mapserver/letterspacing-125.png

Changing the letterspacing to 1.0 in mapprimitive.c makes the rendering more similar:
https://dl.dropbox.com/u/2633201/issues/mapserver/letterspacing-100.png

The output is now also quite similar to the output of Mapnik (after adapting the fontsize).

I've created a ticket for that issue: https://github.com/mapserver/mapserver/issues/4404

Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://github.com/olt | @oltonn





_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev




More information about the mapserver-dev mailing list