JDK-4499991 : Regression:monospaced italic font is not monospaced any more in the beta2
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_2.2
  • CPU: x86
  • Submitted: 2001-09-05
  • Updated: 2001-09-26
  • Resolved: 2001-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta3Fixed
Description
###@###.### 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).


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta3 FIXED IN: merlin-beta3 INTEGRATED IN: merlin-beta3
14-06-2004

EVALUATION The Lucida oblique fonts were removed from the distribution. The intention was that when an application requested an italic version of one of the families for these oblique fonts that algorithmic styling would kick in and the result would be the same and we would not incur download costs. But on Linux these fonts are specified in the font.properties file to be used for italic versions of the composite fonts. This causes problems for both AWT and 2D. AWT would never be able to use the algorithmic styling on the fly as it exclusively gets its fonts from the Xserver, and the XServer will not do this. And since the required font was no longer present, it would get some substitute which is a function of the algoritjm employed by AWT to search, and the fonts available on the system. 2D would also not get the correct font, since the algorithm employed to perform styling of composite fonts determined the need based on the font.properties file specifying the exact same XLFD for plain and styled versions, from which it inferred that the font was in fact not styled and algorithmic styling would need to be invoked. This broke down because the XLFD was not the same in this case - the oblique fonts were specified for the italic styles of the composite font. Changing the font properties files to specify the regular versions would have worked for 2D, but not for AWT as it could not take advantage of the algorithmic styling. ###@###.### 2001-09-25 ============================
25-09-2001

SUGGESTED FIX on linux only, re-enable distribution of the lucida oblique style fonts. ###@###.### 2001-09-25 ============================
25-09-2001