1

While displaying Telugu through unicode in Java 7,java is rendering the blends incorrectly.

For example, here is a simple snippet to display a word in HTML. It works great. All the browsers display the text correctly.

<!DOCTYPE html>
<html>
<body> &#x0C05&#x0C2E&#x0C4D&#x0C2E </body>
</html>

However, the same literals when used in Java (here i am setting the same text to a text area, the display gets messed up.

    Font text_font = new Font ("Gautami", Font.PLAIN, 30);
jtaInput.setFont(text_font);
jtaInput.setText("\u0C05\u0C2E\u0C4D\u0C2E");

Has any one facing issues with Java 7 in the context of unicode character rendering? Any tips/ideas to get over this?

thanks siva jasthi

hippietrail
  • 15,848
  • 18
  • 99
  • 158
SRKJ
  • 29
  • 5
  • 1
    అమ్మ - is rendered by HTML (that is correct) and అమమ్ will be displayed by JAVA (incorrect). I am just showing an example here. The same rendering problem happening for all consonant blends. For example, అక్క, రాష్ట్రము etc. can not be rendered in java – SRKJ Feb 08 '13 at 13:40
  • Does it still work in html if you do `అమ్మ ` ? It is then a problem with the swing renderer probably. – Esailija Feb 08 '13 at 15:00
  • Yes. It still works in html even if i explicitly specify the font name there. It appears that there is bug in java 7 rendering. And it is a devastating bug... any telugu application you develop in java 7 may become useless. – SRKJ Feb 08 '13 at 15:42

1 Answers1

0

Try using different fonts; The font that worked in Java 5 and Java 6 stopped working in Java 7. When I moved to a new Font, the display came back correctly.

SRKJ
  • 29
  • 5