United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4499991 : Regression:monospaced italic font is not monospaced any more in the beta2

Details
Type:
Bug
Submit Date:
2001-09-05
Status:
Resolved
Updated Date:
2001-09-26
Project Name:
JDK
Resolved Date:
2001-09-26
Component:
client-libs
OS:
linux_2.2
Sub-Component:
2d
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (beta3)

Related Reports

Sub Tasks

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


                                     
2004-06-14
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
============================
                                     
2001-09-25
SUGGESTED FIX

on linux only, re-enable distribution of the lucida oblique style fonts.

###@###.### 2001-09-25
============================
                                     
2001-09-25



Hardware and Software, Engineered to Work Together