Font Problems in Multilingual Java Application
I am developing a multilingual Java application in which I make heavy use of JTextArea. There is an apparent (though not actual) font change to the JTextAreas when non-Latin-based characters are inserted. Furthermore, other characteristics of the JTextArea, such as the tab size, appear to change as well.
The following image shows a JTextArea with a default font (Lucinda Grande) and tab size of 2:
The following imag开发者_运维技巧e shows what happens to the JTextArea after inserting a line of Hindi text:
As you can see, the font's appearance as well as the tab size have apparently changed, though when I inspect these properties in a debugger, it is clear they have not. The problem is not limited to Hindi - Arabic text produces the same results, though Korean and Russian text do not. Any Ideas whats going on and if and how I can prevent this?
I believe it has something to do with the Rendering (of course). It seems that antialiasing has now been turned of, maybe because the font is configured to not support it. I would investigate in this direction.
精彩评论