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

Closed
stephankn opened this Issue Oct 28, 2012 · 8 comments

Comments

Projects
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:
Old rendering

New:
New rendering

This is my style:

     <Style name="city">
         <Rule>
             <Filter>(([place]=&apos;city&apos;) or
([place]=&apos;metropolis&apos;))</Filter>
             <MinScaleDenominator>1500000</MinScaleDenominator>
             <MaxScaleDenominator>12500000</MaxScaleDenominator>
             <TextSymbolizer fontset-name="book-fonts" size="9"
halo-radius="1">[name]</TextSymbolizer>
         </Rule>
         <Rule>
             <Filter>(([place]=&apos;city&apos;) or
([place]=&apos;metropolis&apos;))</Filter>
             <MinScaleDenominator>400000</MinScaleDenominator>
             <MaxScaleDenominator>1500000</MaxScaleDenominator>
             <TextSymbolizer fontset-name="book-fonts" size="12"
halo-radius="1">[name]</TextSymbolizer>
         </Rule>
         <Rule>
             <Filter>(([place]=&apos;city&apos;) or
([place]=&apos;metropolis&apos;))</Filter>
             <MinScaleDenominator>25000</MinScaleDenominator>
             <MaxScaleDenominator>400000</MaxScaleDenominator>
             <TextSymbolizer fontset-name="book-fonts" size="15"
halo-radius="1">[name]</TextSymbolizer>
         </Rule>
     </Style>

In the mailing list it was recommended to create a ticket:
https://groups.google.com/forum/?fromgroups=#!topic/mapnik/Mb1g3eRelf8

Owner

springmeyer commented Jan 22, 2013

@ajashton - have you noticed this as well?

Member

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

Owner

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.

Stephan

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)

Owner

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

Member

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.

Owner

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