#11194 closed defect (fixed)
Bangla script not rendered correctly on main map area
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.03 |
Component: | Core mappaint | Version: | |
Keywords: | i18n right-to-left bidi | Cc: | JunaidAhmed |
Description
Bangla script not rendered correctly on main map area.
From #10989:
Replying to bastiK:
Font support on Windows is not bad and many scripts are covered. However, Oracle doesn't bother to include these fonts in their default configuration for Java and makes it ridiculously difficult to fix this on application level.
It's also strange that no one has written a decent
fontconfig.properties
file for Windows yet, at least I couldn't find it. Is JOSM the first Java application ever, which needs support for all the mayor scripts?
JunaidAhmed:
Thanks bastik for adding support for Bengali(Bangla) language in JOSM. Though it can't render Bangla properly(except for the right editing panel, here's a screenshot https://onedrive.live.com/redir?resid=B09DFB31F3364570%215325&authkey=%21AOV0bvcZPU_uWBs&v=3&ithint=photo%2cjpg) just like openstreetmap.org(discussed here https://github.com/gravitystorm/openstreetmap-carto/issues/1346). But thank you anyway.
Attachments (0)
Change History (21)
comment:2 by , 10 years ago
Replying to JunaidAhmed:
We, the OSM users of Bangladesh are facing a problem from about ancient time. The Bangla names on OSM are not rendered properly.
OSM is a geographic database and saves the string as unicode, it does not really render any text at all. You are probably referring to the carto/mapnik tiles which are displayed as default layer on openstreetmap.org. In the ticket you have linked, the developers expect a screenshot with the correct and incorrect rendering side-by-side. Otherwise it is hard to tell, if what you are seeing on your screen is really the same as what they are seeing.
Btw., in the meantime, the Bangladesh community is free to set up an own tile server with proper rendering.
If we write "বরিশাল", OSM will show "বরশিাল"; if we write "সিলেট" as any place name than OSM will show it as "সলিট"; "পিরোজপুর" as "পরি োজপুর"। It is not a browser/OS problem and we can't name anything in our own language bacause of this.
Thanks for the explanation.
Please fix it now.
Please don't be demanding. It hasn't even been brought to our attention so far, we cannot fix something we aren't aware of.
comment:3 by , 10 years ago
Could you test text without halo, e.g. shop=supermarket
& name=*
? This should be displayed correctly.
@team:
The problem is the use of Font.createGlyphVector
. From the Java doc:
Creates a GlyphVector by mapping characters to glyphs one-to-one based on the Unicode cmap in this Font. This method does no other processing besides the mapping of glyphs to characters. This means that this method is not useful for some scripts, such as Arabic, Hebrew, Thai, and Indic, that require reordering, shaping, or ligature substitution.
Currently, I have no idea how to fix this, other than to fallback to simple text rendering without halo. (Doesn't work for text along line - this would need to be dropped.)
comment:4 by , 10 years ago
Description of the problem:
It's hard to to make a English speaker understand about this. There is something in our language(along with many south asian language) called "Kar". They are the short form of vowels and also work as vowels as they do in English language. When one of these "kar"s sits in front of a letter(or under a letter) than JOSM can render them correctly. Imagine a 2 letter word "পাড়", where "প" and "ড়" is letter and "া" is a Kar which is sitting in front of the letter "প". It will be rendered correctly on JOSM. But when one of those "Kars" sits behind a letter than the problem will start and JOSM renderer wiil show it sitting in front of the letter(behind the next letter). Example: Imagine another 2 letter word "ডিম" where the Kar is "ি" and it is sited behind the letter "ড". But JOSM will render this word as "ডমি" placing the Kar in front of the letter "ড", behind the next letter "ম".
The language Bangla has 10 Kars: া, ি, ী, ু, ূ ৃ, ে, ৈ, ো and ৌ. JOSM can only render া, ী, ু, ূ and ৃ properly who sit in front and under of letters. Can't render ি, ে, ৈ who sit behind of letters. JOSM also can't render ো and ৌ who has 2 parts one sitting behind and one part sitting in front of the letter at the same time. Many south Asian language use Kars. The site www.openstreetmap.org has 100% same problem
follow-up: 6 comment:5 by , 10 years ago
Are you referring to the text on the main map in JOSM or also the text in the right hand panel? Please answer the question from my previous post.
comment:6 by , 10 years ago
Replying to bastiK:
Are you referring to the text on the main map in JOSM or also the text in the right hand panel? Please answer the question from my previous post.
The right hand panel in JOSM shows the correct form in most cases. I'm talkig about the main map. JOSM right panel has no problem with "Kar"s but it can't show conjunct letters properly(breaks them as separate letter) which isn't a bigger case since we can understand them most of the time. But you should copy the text and and paste it to notepad to be sure about the right form of texts. Notepad always shows the right form.
(Updated)
follow-up: 9 comment:7 by , 10 years ago
I think this discussion should also be moved to Java development tickets, as everything we can do is only a sort of workaround. Proper fixes should be inside Java.
follow-up: 10 comment:9 by , 10 years ago
Replying to stoecker:
I think this discussion should also be moved to Java development tickets, as everything we can do is only a sort of workaround. Proper fixes should be inside Java.
Everything works as documented, I don't think Java is to blame. (this time) :)
Fixing the text along path is more complicated without using the GlyphVector
class.
follow-up: 13 comment:10 by , 10 years ago
Replying to bastiK:
Replying to stoecker:
I think this discussion should also be moved to Java development tickets, as everything we can do is only a sort of workaround. Proper fixes should be inside Java.
Everything works as documented, I don't think Java is to blame. (this time) :)
Which does not mean it is right. Seems they simply documented that their functions are buggy.
comment:12 by , 10 years ago
follow-up: 19 comment:13 by , 10 years ago
Replying to stoecker:
Replying to bastiK:
Replying to stoecker:
I think this discussion should also be moved to Java development tickets, as everything we can do is only a sort of workaround. Proper fixes should be inside Java.
Everything works as documented, I don't think Java is to blame. (this time) :)
Which does not mean it is right. Seems they simply documented that their functions are buggy.
Found the function that does glyph reordering. The limitation is that it only works for uniform text direction. So if the name of a street contains both Arabic and Roman letters, the Arabic text will be rendered in reversed character order.
Anyway, this is an improvement as right-to-left text along a line was always rendered reversed so far. I leave the bi-directional case for another day. (At least till we get a bug report... )
comment:14 by , 10 years ago
Milestone: | → 15.03 |
---|
comment:15 by , 10 years ago
This is great :) I hope these changes will lead to asian languages translations on Launchpad.
comment:16 by , 10 years ago
Component: | Core → Core mappaint |
---|
comment:17 by , 9 years ago
Keywords: | i18n right-to-left added |
---|
comment:18 by , 9 years ago
Keywords: | bidi added |
---|
comment:19 by , 9 years ago
comment:20 by , 6 years ago
Tamil font not displaying in JOSM. it shows in square box. please help. I use windows 7, i have latha font and I can see Tamil texts in other applications/browser. Thanks
comment:21 by , 6 years ago
Please create a new bug report from JOSM using Help -> Report Bug and attach a screenshot + an .osm file showing the problem.
We, the OSM users of Bangladesh are facing a problem from about ancient time. The Bangla names on OSM are not rendered properly. If we write "বরিশাল", OSM will show "বরশিাল"; if we write "সিলেট" as any place name than OSM will show it as "সলিট"; "পিরোজপুর" as "পরি োজপুর"। It is not a browser/OS problem and we can't name anything in our own language bacause of this. Please fix it now.
Like in this link (http://www.openstreetmap.org/node/317729205#map=14/22.6961/90.3929) the right form of the city name is "বরিশাল" as nthe left panel shows. But OSM shows it as "বরশিাল" which is wrong. In another example(http://www.openstreetmap.org/node/1623159414) right form is "পিরোজপুর" but OSM shows "পর োজপুর".
JOSM has 100% same problem now.