[OSM-talk] really minor Mapnik issue

Jon Burgess jburgess777 at googlemail.com
Fri Oct 3 19:27:54 BST 2008


On Fri, 2008-10-03 at 12:02 +0200, Norbert Wenzel wrote:
> Hi,
> 
> I just saw the name of a golf course in Salzburg, Austria [0] which 
> shows a small (for Mapnik, but really big typographical) error. The dash 
> in the name is drawn as the first sign in a line, which is really ugly.

Mapnik has its own development community outside of OSM and you may find
it a better place to raise this issue.

> It doesn't even make any sense to draw it like that, since the last line 
> (the line with the dash) is the longest line, so there would have been 
> enough space in the previous line for the dash, without increasing the 
> size of the texts bounding box further than necessary.

The current algorithm splits the line at the first space after it
exceeds the configured width. Your suggestion sounds reasonable but you
need to find a C++ programmer willing to develop it.

> Anyway, in my opinion the BB doesn't even matter, because the dash 
> should *never* be the first sign in a line.
> 
> Don't get me wrong, it's only a minor issue, but it's really ugly, and 
> if it would be easy to fix, I'd appreciate that. If it's not easy, it 
> should be kept in mind, but I don't think such typographical errors are 
> very often found on the map, so it wouldn't need a high priority.

It starts getting even more complex once you start having to worry about
which Unicode characters are appropriate places to split a line. One
possibility might be to defer the work to a library like:

http://vimgadgets.cvs.sourceforge.net/viewvc/vimgadgets/common/tools/linebreak/

	Jon

> cheers,
> Norbert
> 
> [0] 
> http://www.openstreetmap.org/?mlat=47.71974&mlon=13.06424&zoom=17&layers=B000FTF







More information about the talk mailing list