In Swing classes that display Arabic text, the font metrics are apparently computed using the unjoined form of the Arabic letters. Since on the average the joined glyphs are narrower than the unjoined glyphs, this usually results in text areas that are wider than the actual text. In some cases the text fields are narrower. Try putting an Arabic word with five letters followed by five blanks (\u0020) in a jLabel. Make another jLabel with the same five letters interspersed with five blanks. The font metrics are correct for the second jLabel because the letters are forced to be unjoined, but not for the first.
- relates to
-
JDK-4222932 Add bidi capability to jTextArea and jTextPane
-
- Closed
-