###@###.### 2001-09-05
J2SE Version (please include all output from java -version flag):
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
Does this problem occur on J2SE 1.3? Yes / No (pick one)
No. (It works fine on build 74)
Operating System Configuration Information (be specific):
Redhat Linux 7.1, very likely to occur on other Linux flavors as well.
XFree 4.0.2
Hardware Configuration Information (be specific):
Athlon 1GHz, 256 MB RAM, Ati graphics adapter
Bug Description:
The monospaced italic font is not monospaced any more in the beta2
(build77). It was working perfectly up to CAP build 74.
This regression bug was introduced since build 75.
Steps to Reproduce (be specific):
Run the attached Java program(FontMetricsTest.java) on the JDK 1.4
beta2 on Linux to reproduce.
Test program: (FontMetricsTest.java)
------------------------------------------
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
/**
* This application shows off that the italic monospaced font is no longer monospaced in the JDK 1.4beta2 on Linux
*
*/
public class FontMetricsTest
{
private static final int[] fontStyles = { Font.PLAIN, Font.BOLD, Font.ITALIC, Font.BOLD | Font.ITALIC };
public static void main(String[] args)
{
FontMetrics italicMonospacedFontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(new Font("Monospaced", Font.ITALIC, 14));
System.out.println("width of an i: "+italicMonospacedFontMetrics.stringWidth("i"));
System.out.println("width of an m: "+italicMonospacedFontMetrics.stringWidth("m"));
}
}
###@###.### 2001-09-10
more info passed by submitter:
This bug is present for the bolditalic monospaced font as well (Font.BOLD |
Font.ITALIC).