|
I am facing one problem while displaying labels in Hindi language.
Characters in the text is getting rendered in misplaced order. For example when I try to display label with the text हिन�द� it is not taking into consideration the complex text layout (http://en.wikipedia.org/wiki/Complex_text_layout).
I have attached an image which shows how the text should be displayed correctly and how it is getting displayed on map.
Java Swing controls and java 2d graphics drawString() displays the text correctly. I tried with different fonts including the specific Hindi font also but the result was the same.
It can probably be fixed by changing
https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/label/LabelPainter.java#L327
line 327
return font.createGlyphVector(graphics.getFontRenderContext(), chars);
TO
return font.layoutGlyphVector(graphics.getFontRenderContext(),chars, 0, length, Font.LAYOUT_LEFT_TO_RIGHT);
There are left to right languages which also follow complex layout.
Thanks.
|