Details
-
Bug
-
Resolution: Fixed
-
P2
-
18, 19
-
Windows Server 2012R2 Japanese
Windows 10 Pro 21H2 Japanese
Description
FULL PRODUCT VERSION :
openjdk version "18" 2022-03-22
OpenJDK Runtime Environment (build 18+36-2087)
OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
AWT Text shows Japanese fonts with wrong size.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Launch the sample program on Japanese Windows.
EXPECTED VERSUS ACTUAL BEHAVIOR :
See the attached images.
errorJPFont.png: Japanese font is drawing with unexpected size.
expected.png: Both English and Japanese fonts are expected.
REPRODUCIBILITY :
This bug can be reproduced always.
ADDITIONAL INFORMATION:
This issue can be related with JEP 400, UTF-8 by Default.
When we use "-Dfile.encoding=COMAPT", this issue was gone.
---------- BEGIN SOURCE ----------
import java.awt.*;
public class fonttest {
public static void main(String[] args) {
Frame f = new Frame();
TextField t = new TextField();
t.setText("ABC\u3042\u3044ABC");
t.setFont(new Font(Font.SERIF, Font.PLAIN, 8));
f.add(t);
f.setSize(200,100);
f.setVisible(true);
}
}
---------- END SOURCE ----------
openjdk version "18" 2022-03-22
OpenJDK Runtime Environment (build 18+36-2087)
OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
AWT Text shows Japanese fonts with wrong size.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Launch the sample program on Japanese Windows.
EXPECTED VERSUS ACTUAL BEHAVIOR :
See the attached images.
errorJPFont.png: Japanese font is drawing with unexpected size.
expected.png: Both English and Japanese fonts are expected.
REPRODUCIBILITY :
This bug can be reproduced always.
ADDITIONAL INFORMATION:
This issue can be related with JEP 400, UTF-8 by Default.
When we use "-Dfile.encoding=COMAPT", this issue was gone.
---------- BEGIN SOURCE ----------
import java.awt.*;
public class fonttest {
public static void main(String[] args) {
Frame f = new Frame();
TextField t = new TextField();
t.setText("ABC\u3042\u3044ABC");
t.setFont(new Font(Font.SERIF, Font.PLAIN, 8));
f.add(t);
f.setSize(200,100);
f.setVisible(true);
}
}
---------- END SOURCE ----------
Attachments
Issue Links
- relates to
-
JDK-8187041 JEP 400: UTF-8 by Default
- Closed