Ticket #1515 (closed defect: fixed)

Opened 5 years ago

Last modified 6 months ago

RTL text word-wraps in reverse order

Reported by: Esperanza36 Owned by: mapnik-team@…
Priority: major Milestone:
Component: mapnik Version:
Keywords: Cc: dimka, amire80, yrtimid@…

Description

There is a problem with Arabic names rendering on Mapnik, only for areas, like hospitals, public buildings, parks names ... and not for street names.

Words are correctly rendered, but they are not in the good order (last are first). For instance here : http://www.openstreetmap.org/?lat=31.42411&lon=34.33985&zoom=15&layers=B000FTF

مخيّم دير البلح (good one)

is on OSM the contrary

البلح دير مخيّم

Change History

comment:1 Changed 5 years ago by tom@…

I've just looked at that link at it appears to be rendering in the way you say is correct - it is rendered as "مخيّم دير البلح" at the moment. Are you seeing something different?

comment:2 Changed 5 years ago by Esperanza36

No, first we must have مخيّم (refugee camp) then دير (deir) and last البلح (al balah) on the second line of : http://www.openstreetmap.org/?lat=31.42411&lon=34.33985&zoom=15&layers=B000FTF So words are not in the right place

comment:3 follow-up: ↓ 4 Changed 5 years ago by tom@…

In that case I think the problem is that the tagging is wrong. If I look at that node in my web browser by going to http://www.openstreetmap.org/browse/node/327387610 then my browser renders it (in both the name and name:ar tags) as "مخيّم دير البلح" but you seem to be saying it should be the other way round?

So is my browser also getting the rendering wrong? or are you saying it should be rendered differently on the map to when written as a string?

comment:4 in reply to: ↑ 3 Changed 5 years ago by Esperanza36

The tag is ok : http://www.openstreetmap.org/browse/node/327387610 name:ar = مخيّم دير البلح

The problem is that on the first line on mapnik rendering (no problem with osmander) we should have مخيّم

and not البلح

On the second line instead of مخيّم دير

we should have دير البلح

I use Mozilla ...

comment:5 follow-up: ↓ 6 Changed 5 years ago by tom@…

OK. So what you're saying is that the words on the map should be rendered in a different order to the words when written as a string? Why is that?

Is the issue that there is a line break and that in arabic you read lines from bottom to top rather than top to bottom?

comment:6 in reply to: ↑ 5 Changed 5 years ago by Esperanza36

In Arabic, we read lines from top to bottom ;) The bug happens only when there is lines, not when it's one line (street names, ...)

comment:7 Changed 5 years ago by tom@…

Aha... I get it now... This is a mapnik problem though, so it will need to be raised in the mapnik trac as it isn't something in our code base that is wrong.

comment:8 Changed 5 years ago by tom@…

I have raised this in the mapnik trac as  http://trac.mapnik.org/ticket/189.

comment:9 Changed 5 years ago by Ldp

#2182 has been marked as duplicate of this ticket.

comment:10 Changed 4 years ago by steve8@…

  • Owner changed from steve8@… to mapnik-team@…

comment:11 Changed 4 years ago by claudius.h@…

  • Summary changed from Arabic rendering to RTL text word-wraps in reverse order

comment:12 Changed 3 years ago by jahudie@…

It is really about time to take care of this issue. Just imagine that we would write "Kingdom United" instead of "United Kingdom" It would be fixed right away.

Please check if you could fix this bug somehow that was opened.

comment:13 Changed 3 years ago by TomH

As I explained in the previous comment, this is not something we have have any control over - it is an issue with the mapnik software we use to render the map.

We have reported the issue upstream so if you want to moan (which would be bad form anyway for Open Source Software) then you should do so at  http://trac.mapnik.org/ticket/189 as moaning here will achieve nothing.

comment:14 Changed 3 years ago by dimka

  • Cc dimka added

I've submitted a "quick and dirty" patch upstream.

Can it be incorporated in the main OSM mapnik layer?

comment:15 follow-up: ↓ 16 Changed 3 years ago by Ldp

Only if/when it is fixed upstream, and in due time.

Submitting a "quick and dirty" patch upstream isn't going to magically make everything alright in the main OSM mapnik layer all by itself and overnight. It's currently still at 0.7.2-dev, so any fixes in trunk will be off limits until such a time we switch over to mapnik trunk.

Nevertheless, thanks for taking a look at fixing this upstream.

comment:16 in reply to: ↑ 15 Changed 3 years ago by dimka

Replying to Ldp:

Only if/when it is fixed upstream, and in due time.

Submitting a "quick and dirty" patch upstream isn't going to magically make everything alright in the main OSM mapnik layer all by itself and overnight. It's currently still at 0.7.2-dev, so any fixes in trunk will be off limits until such a time we switch over to mapnik trunk.

Nevertheless, thanks for taking a look at fixing this upstream.

I hope that when the mapnik team finishes all the necessary tests, the patch can be incorporated into the 0.7 line and not wait for the Mapnik2 release. In that case, will it be possible to update the downstream version of mapnik running on the main OSM site?

Please understand that this is a very annoying bug - people see many labels messed up the first time they open OSM.

comment:17 follow-up: ↓ 18 Changed 3 years ago by TomH

Getting it in to 0.7 is supremely irrelevant as I believe we have been running mapnik 2 for some time now,

comment:18 in reply to: ↑ 17 Changed 3 years ago by Ldp

Replying to TomH:

Getting it in to 0.7 is supremely irrelevant as I believe we have been running mapnik 2 for some time now,

Correct, but I've falsely assumed it would need a stylesheet element to activate, and in that case, our 0.7- style XML is still relevant. Upon reviewing the patch, it seems that's not needed. This would mean we could get the patch active on osm.org once it's accepted into mapnik trunk.

comment:19 Changed 3 years ago by dimka

The patch has just been committed to Mapnik trunk ( http://trac.mapnik.org/changeset/3365).

comment:20 Changed 3 years ago by dimka

Please consider applying the patch.

comment:21 Changed 2 years ago by Esperanza36

Please consider applying the patch. This bug is VERY annoying for my arabs friends. Thanks in advance

comment:22 Changed 2 years ago by amire80

  • Cc amire80 added

comment:23 follow-up: ↓ 24 Changed 2 years ago by amire80

Now this also affects the official Mobile Wikipedia app, which is switching from Google to OSM.

comment:24 in reply to: ↑ 23 Changed 2 years ago by Ldp

Replying to amire80:

Now this also affects the official Mobile Wikipedia app, which is switching from Google to OSM.

Then the persons making that Mobile Wikipedia app can fix it by upgrading their mapnik, right?

comment:25 Changed 2 years ago by Gnonthgol

  • Status changed from new to closed
  • Resolution set to fixed

comment:26 follow-up: ↓ 27 Changed 2 years ago by dimka

  • Status changed from closed to reopened
  • Resolution fixed deleted

No change is apparent on OSM.org

comment:27 in reply to: ↑ 26 Changed 2 years ago by Ldp

Replying to dimka:

No change is apparent on OSM.org

That's because the mapnik version there hasn't been updated yet, but I understand the good mapnik folks hope to have a new release soon.

comment:28 Changed 19 months ago by mariotomo

any news? when is mapnik scheduled to be updated on OSM?

 http://osm.org/go/btJRqQa5Y-- (above map shows "مركش/باب and مركش/برج")

comment:29 follow-up: ↓ 31 Changed 19 months ago by TomH

We plan to reload the rendering database in the next few weeks with an ODBL clean planet, and I believe Jon plans to upgrade mapnik at the same time.

comment:30 Changed 17 months ago by yrtimid@…

  • Cc yrtimid@… added

comment:31 in reply to: ↑ 29 Changed 15 months ago by sdoerr

Replying to TomH:

We plan to reload the rendering database in the next few weeks with an ODBL clean planet, and I believe Jon plans to upgrade mapnik at the same time.

Did this happen? The word-wrap issue with Arabic still seems to be there, e.g. (currently in the news) In Amenas.

Last edited 15 months ago by sdoerr (previous) (diff)

comment:32 Changed 15 months ago by TomH

Not yet no, it is still in the planning stages as it is a major update of software and hardware.

comment:33 Changed 6 months ago by TomH

The reload was done a few months ago - could you check if this is now fixed?

comment:34 Changed 6 months ago by yrtimid@…

The hebrew word-wrap looks good now.

comment:35 Changed 6 months ago by TomH

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.