[mapserver-dev] Letterspacing is different for polyline labels

Daniel Morissette dmorissette at mapgears.com
Mon Jul 30 10:38:58 PDT 2012


Do we know when the 1.25 factor was introduced and by who? My only 
concern would be to not undo something that may have been done for a 
good reason, otherwise I have no objection.

Daniel

On 12-07-30 12:50 PM, thomas bonfort wrote:
> Any objection in pushing this into 6.2 ? From all my tests, there were
> no more or no less inter-character collisions when reducing the
> letterspacing, and it has the added advantage of a consistent output
> between ANGLE AUTO and ANGLE FOLLOW labels (follow labels fall back to
> "auto" mode when the line has only two vertices).
>
> regards,
> thomas
>
> On Tue, Jul 24, 2012 at 10:46 PM, Lime, Steve D (DNR)
> <Steve.Lime at state.mn.us> wrote:
>> +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
>>
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000





More information about the mapserver-dev mailing list