-
Bug
-
Resolution: Duplicate
-
P3
-
11
-
x86_64
-
windows_7
ADDITIONAL SYSTEM INFORMATION :
OS : Windows 7 64 bit Japanese
Java version : Java 11 early access 17
This happens with both OpenJDK builds and Oracel JDK builds.
A DESCRIPTION OF THE PROBLEM :
When a String that includes Japanese characters are rotated and drawn, the Japanese characters are always drawn upright. I expect that the Japanese characters should be drawn with rotation, too.
Alphabet characters are rotated along with the angle of String. However Japanese characters are always not rotated. They are always upright.
REGRESSION : Last worked in version 10.0.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
BufferedImage bi = new BufferedImage(1024, 1024, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d =(Graphics2D)bi.getGraphics();
for(double a = 0;a < Math.PI*2; a+=Math.PI/36d){
AffineTransform at = new AffineTransform();
at.setToRotation(a);
g2d.setTransform(at);
double d =(int)( a * 180 / Math.PI + 0.1);
g2d.setColor(Color.BLACK);
g2d.drawString("ããããabc_rotated_"+d, 300, 0);
}
try{
ImageIO.write(bi, "PNG", new File(System.currentTimeMillis() + ".png"));
}catch(Exception ex){
ex.printStackTrace();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Both Japanese and Alphabetical characters are rotated depending on the angle of AffineTransform.
ACTUAL -
Japanese characters are always upright, whereas alphabetic characters are drawn with angles.
FREQUENCY : always
OS : Windows 7 64 bit Japanese
Java version : Java 11 early access 17
This happens with both OpenJDK builds and Oracel JDK builds.
A DESCRIPTION OF THE PROBLEM :
When a String that includes Japanese characters are rotated and drawn, the Japanese characters are always drawn upright. I expect that the Japanese characters should be drawn with rotation, too.
Alphabet characters are rotated along with the angle of String. However Japanese characters are always not rotated. They are always upright.
REGRESSION : Last worked in version 10.0.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
BufferedImage bi = new BufferedImage(1024, 1024, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d =(Graphics2D)bi.getGraphics();
for(double a = 0;a < Math.PI*2; a+=Math.PI/36d){
AffineTransform at = new AffineTransform();
at.setToRotation(a);
g2d.setTransform(at);
double d =(int)( a * 180 / Math.PI + 0.1);
g2d.setColor(Color.BLACK);
g2d.drawString("ããããabc_rotated_"+d, 300, 0);
}
try{
ImageIO.write(bi, "PNG", new File(System.currentTimeMillis() + ".png"));
}catch(Exception ex){
ex.printStackTrace();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Both Japanese and Alphabetical characters are rotated depending on the angle of AffineTransform.
ACTUAL -
Japanese characters are always upright, whereas alphabetic characters are drawn with angles.
FREQUENCY : always
- duplicates
-
JDK-8204929 Fonts with embedded bitmaps are not always rotated
-
- Resolved
-