With our upgrade to JDK 6 update 12, when I execute the following:

public class FontTest {
    public static void main(String[] args) throws Exception {
        System.out.println(System.getProperty("java.version"));
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        JFrame f = new JFrame();
        JLabel l = new JLabel("This will not look good");
        Font font = new Font("Sans Serif", Font.PLAIN, 11);
        font = font.deriveFont(10.66666666666666f);
        l.setFont(font);
        System.out.println(font);
        f.add(l);
        f.pack();
        f.setLocationRelativeTo(null);
        f.show();
    }
}

The resultant label looks pretty bad -- there is a big gap between the "w" and 
the "i" in "will", for example. This looked fine in previous JDK 6 updates.

Note that other fonts, like Tahoma, look fine, though are smaller than before, 
presumably because Java is actually respecting the fractional size now.

(If you want to know why I'd bother with this, it's because we have a routine 
that allows the user to choose from point sizes that get converted into the 
sizes Java expects (e.g., 8 is converted to 11). This routine results in 
fractional sizes.)

Thanks,
Jared
[Message sent by forum member 'jaredmac' (jaredmac)]

http://forums.java.net/jive/thread.jspa?messageID=342486

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to