-
Bug
-
Resolution: Fixed
-
P3
-
7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2226745 | 7u6 | Philip Race | P2 | Closed | Fixed | b22 |
The following test program shows different metrics between JDK 6 and JDK 7
Its extreme if you use the "all spaces" string.
Note run on Windows as its using a Windows font.
import javax.swing.*;
import java.awt.Font;
import java.awt.*;
public class Gulim extends JComponent {
public static void main(String args[]) {
JFrame frame = new JFrame("Korean font test");
frame.setBounds(100, 100, 600, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new Gulim());
frame.setVisible(true);
}
public Dimension getPreferredSize() {
return new Dimension(600,500);
}
public void paintComponent(Graphics g) {
int y=20;
String text = " X. ABCDEFGabcdefg What type of request do you want to run?";
//String text = "ZX.ZABCDEFGabcdefgZWhatZtypeofZrequestZdoZyouZwantZtoZrun?";
//String text = " ";
for (int sz=9; sz<18;sz++) {
Font f = new Font("Gulim", Font.BOLD, sz);
g.setFont(f);
String s = text + " " + Integer.valueOf(sz);
g.drawString(s, 0, y);
y+=sz+2;
}
}
}
Its extreme if you use the "all spaces" string.
Note run on Windows as its using a Windows font.
import javax.swing.*;
import java.awt.Font;
import java.awt.*;
public class Gulim extends JComponent {
public static void main(String args[]) {
JFrame frame = new JFrame("Korean font test");
frame.setBounds(100, 100, 600, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new Gulim());
frame.setVisible(true);
}
public Dimension getPreferredSize() {
return new Dimension(600,500);
}
public void paintComponent(Graphics g) {
int y=20;
String text = " X. ABCDEFGabcdefg What type of request do you want to run?";
//String text = "ZX.ZABCDEFGabcdefgZWhatZtypeofZrequestZdoZyouZwantZtoZrun?";
//String text = " ";
for (int sz=9; sz<18;sz++) {
Font f = new Font("Gulim", Font.BOLD, sz);
g.setFont(f);
String s = text + " " + Integer.valueOf(sz);
g.drawString(s, 0, y);
y+=sz+2;
}
}
}
- backported by
-
JDK-2226745 Metrics of space character in algorithmically emboldened font have changed in JDK 7.
- Closed
- relates to
-
JDK-6686365 bolded zero width space has non zero width in FM or LCD modes
- Closed