Wrong right-to-left rendering if string contains numbers #519

Closed
artemp opened this Issue Oct 11, 2011 · 5 comments

Comments

Projects
None yet
4 participants
@artemp
Member

artemp commented Oct 11, 2011

If the string for a label contains any numbers besides right-to-left text (arabic, farsi, hebrew...) the whole string gets rendered on a character by character basis.
So instead of "نامجو 17" you will get "ن ا م ج و 17". See this example in Mapnik openstreetmap: http://www.openstreetmap.org/?lat=36.27183&lon=59.57726&zoom=17

The weird thing is that the right-to-left text direction stays intact for the letters, but they are not concatenated correctly within the charset.

@artemp

This comment has been minimized.

Show comment
Hide comment
@artemp

artemp Oct 11, 2011

Member

[grille_chompa] The detection of writing direction for strings seems to break once a number occurs in the string.
If you look at http://osm.org/go/zY1pNe@v0-- where the square label "میدان 17 شهریور" has a number in middle, you see that pre-number (looking from right to left) word alphabets are separated but the post-number word is OK.

Member

artemp commented Oct 11, 2011

[grille_chompa] The detection of writing direction for strings seems to break once a number occurs in the string.
If you look at http://osm.org/go/zY1pNe@v0-- where the square label "میدان 17 شهریور" has a number in middle, you see that pre-number (looking from right to left) word alphabets are separated but the post-number word is OK.

@ghost ghost assigned herm Jun 25, 2012

@herm

This comment has been minimized.

Show comment
Hide comment
@herm

herm Jun 25, 2012

Member

Mapnik current doesn't perform the unicode bidirectional algorithm correctly. So it can't handle labels with both right-to-left and left-to-right character correctly. I'm rewriting the relevant part of mapnik and this problem should be gone in a few months.

Member

herm commented Jun 25, 2012

Mapnik current doesn't perform the unicode bidirectional algorithm correctly. So it can't handle labels with both right-to-left and left-to-right character correctly. I'm rewriting the relevant part of mapnik and this problem should be gone in a few months.

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Jun 25, 2012

Member

/cc @grillechompa so he sees @herm's comment on the plan for this issue.

Member

springmeyer commented Jun 25, 2012

/cc @grillechompa so he sees @herm's comment on the plan for this issue.

@claudiush

This comment has been minimized.

Show comment
Hide comment
@claudiush

claudiush Jun 25, 2012

Thanks for the heads up, Dane.

FYI: The problem does not occur any more on the OpenStreetMap.org mapnik rendering any more. Not sure if it has been fixed by any preprocessing from OSM or via OSM. The examples mentioned before all render okay now.

Thanks for the heads up, Dane.

FYI: The problem does not occur any more on the OpenStreetMap.org mapnik rendering any more. Not sure if it has been fixed by any preprocessing from OSM or via OSM. The examples mentioned before all render okay now.

herm added a commit that referenced this issue Jul 21, 2012

@herm

This comment has been minimized.

Show comment
Hide comment
@herm

herm Aug 21, 2012

Member

Closing this ticket as the issue is solved in the harfbuzz branch. Refs #1428.

Member

herm commented Aug 21, 2012

Closing this ticket as the issue is solved in the harfbuzz branch. Refs #1428.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment