OPERATING SYSTEMS
-----------------
Windows 7 Professional (Japanese)
Windows Server 2008 Enterprise x64 SP2 (Japanese)
FULL JDK VERSION
----------------
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b85)
Java HotSpot(TM) Client VM (build 17.0-b10, mixed mode)
DESCRIPTION
-----------
On Japanese Windows, an unexpected font is loaded in the TextArea/TextField component. It seems that the TextField component loads the "MS Sans Serif" font instead of "MS Gothic" by default.
This causes the following issues (see recreation instructions below):
1. Font size is smaller than Java6's TextArea/TextField
2. On TextArea, cannot use OnTheSpot Input Style, floating IM window is
displayed
3. On TextArea, if Japanese characters are inputed by MS-IME, font
glyphs are overlapped
4. On TextField, cannot use OverTheSpot Input Style, floating IM window
is displayed
5. On TextField, Unicode Extension B Japanese characters (like U+2000B)
font height is larger than standard Japanese characters
6. On TextField, U+3099(Combining Katakana-Hiragana Voiced Sound Mark)
and U+309A(Combining Katakana-Hiragana Semi-Voiced Sound Mark) are
not displayed at the correct position
These issues are not seen with Java 6 (tested with 6u18).
REPRODUCTION INSTRUCTIONS
-------------------------
Issues (1)(2)(3)(4):
1. Compile and run above test program
2. Turn on MS-IME on TextField and TextArea component
3. Type "aiueo"
Issue (5):
1. Compile and run above test program
2. Turn on MS-IME on TextField and TextArea component
3. Type "2000B", press F5, select Japanese character
Issue(6):
1. Compile and run above test program
2. Turn on MS-IME on TextField and TextArea component
3. Type "304B", press F5, select "Hiragana KA"
4. Type "3099", press F5, select Combining Katakana-Hiragana Voiced
Sound Mark
TESTCASE SOURCE
---------------
import java.awt.*;
import java.awt.event.*;
class TextTest extends Frame {
TextTest(Component comp) {
setTitle(comp.getClass().getSimpleName());
add(comp);
setSize(300,200);
setLocationByPlatform(true);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) { System.exit(0); }
});
setVisible(true);
}
public static void main(String[] args) {
new TextTest(new TextArea());
new TextTest(new TextField());
}
}