Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
stephankn opened this Issue · 8 comments

5 participants

@stephankn

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

@springmeyer
Owner

@ajashton - have you noticed this as well?

@ajashton

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.

@stephankn

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.

@artemp artemp was assigned
@springmeyer springmeyer was assigned
@springmeyer
Owner

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

@stephankn
@springmeyer
Owner

@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
Collaborator

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
Owner

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

@springmeyer springmeyer referenced this issue from a commit
@springmeyer springmeyer 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
64d5153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.