-
Bug
-
Resolution: Duplicate
-
P3
-
11
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
Rotated text does not italicize correctly in 11.0.4 but works good in 11.0.3
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please execute the sample code given
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text should be italicized
ACTUAL -
Text is italicized but lost alignment
---------- BEGIN SOURCE ----------
package org.kodejava.example.geom;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.AffineTransform;
public class CheckFontRotation extends JPanel {
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
// Define rendering hint, font name, font style and font size
//g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setFont(new Font("Lucida Sans", Font.ITALIC, 22));
g2.setColor(Color.RED);
// Rotate 90 degree to make a vertical text
AffineTransform at = new AffineTransform();
at.setToRotation(Math.toRadians(90), 80, 100);
g2.setTransform(at);
g2.drawString("This is a vertical text", 10, 10);
}
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setTitle("Draw Vertical Text Demo");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.add(new CheckFontRotation());
frame.pack();
frame.setSize(420, 350);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always
Rotated text does not italicize correctly in 11.0.4 but works good in 11.0.3
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please execute the sample code given
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text should be italicized
ACTUAL -
Text is italicized but lost alignment
---------- BEGIN SOURCE ----------
package org.kodejava.example.geom;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.AffineTransform;
public class CheckFontRotation extends JPanel {
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
// Define rendering hint, font name, font style and font size
//g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setFont(new Font("Lucida Sans", Font.ITALIC, 22));
g2.setColor(Color.RED);
// Rotate 90 degree to make a vertical text
AffineTransform at = new AffineTransform();
at.setToRotation(Math.toRadians(90), 80, 100);
g2.setTransform(at);
g2.drawString("This is a vertical text", 10, 10);
}
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setTitle("Draw Vertical Text Demo");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.add(new CheckFontRotation());
frame.pack();
frame.setSize(420, 350);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8210058 Algorithmic Italic font leans opposite angle in Printing
- Resolved