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;
}
}
}