Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Too much multiline spacing (also on generated line-wraps) #1547

stephankn opened this Issue Oct 28, 2012 · 8 comments


None yet
5 participants

I just upgraded my mapnik installation from 0.7 to 2.1.
I'm using a slightly adapted OSM style.

My map is rendering bilingual, the languages are separated by a "\n".
Increased spacing can also be observed on lines that are wrapped by mapnik.

With the new rendering the lines are too far apart.
See old and new rendering.
Old rendering

New rendering

This is my style:

     <Style name="city">
             <Filter>(([place]=&apos;city&apos;) or
             <TextSymbolizer fontset-name="book-fonts" size="9"
             <Filter>(([place]=&apos;city&apos;) or
             <TextSymbolizer fontset-name="book-fonts" size="12"
             <Filter>(([place]=&apos;city&apos;) or
             <TextSymbolizer fontset-name="book-fonts" size="15"

In the mailing list it was recommended to create a ticket:


springmeyer commented Jan 22, 2013

@ajashton - have you noticed this as well?


ajashton commented Jan 22, 2013

Hm yes. Although I think I noticed it around the time I started using Open Sans everywhere (about a year ago) and thought it had to do with that.

As I did not change the font it must be something inside the mapnik rendering.

I think I saw a screenshot of the harfbuzz branch rendering somewhere which improved it a lot. As I still run a stable release I can't verify myself.

@ghost ghost assigned artemp and springmeyer May 9, 2013


springmeyer commented May 15, 2013

hey @herm - do you think something small could be backported from the harfbuzz branch to fix this?

How about integrating all of the harfbuzz stuff in the main line? It fixes most of the annoying text-rendering related issues.


Dane Springmeyer notifications@github.com schrieb:

hey @herm - do you think something small could be backported from the
harfbuzz branch to fix this?

Reply to this email directly or view it on GitHub:
#1547 (comment)


springmeyer commented May 15, 2013

@stephankn - yes, that is the plan, but we are preparing for a 2.2 before (and to help get ready for) integrating harfbuzz work


herm commented May 16, 2013

The problem is most likely the line spacing in the font. In 0.7 Mapnik used the height of the highest glyph to calculate line spacing, but in 2.x it uses the line spacing information provided by the font. I have seen this problem rendering text in khmer, but the rendering in other applications (e.g. OpenOffice) was identical so I assumed it is correct.


springmeyer commented May 21, 2013

Thanks @herm, so re-assigning this to harfbuzz branch and closing since this is done in harfbuzz and not actionable really in master.

springmeyer pushed a commit that referenced this issue Nov 22, 2013

Improved support for international text
 - Implementation by @herm for GSOC 2012 (http://mapnik.org/news/2012/10/06/gsoc2012-status9/)
 - C++11 port, improvements, optimizations by @artemp
 - Testing and integration with master by @springmeyer
 - Thank you to all the support from @behdad along the way
 - Thanks for help testing @toton6868, @stephankn, @nirvn, @mfrasca, @simonsonc and many others

Refs: #2073,#2070,#2038,#2037,#1953,#1820,#1819,#1714,#1634,#1547,#1532,#1319,#1208,#1154,#1146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment