-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
x86
-
linux
Name: bsC130419 Date: 08/03/2001
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
I see there are similar bugs reported (4470394), but
this seems like it might be a different issue.
The height of 12 point italic Courier as reported by
FontMetrics.getHeight() has gone from 13 in jdk 1.3.1
to 23 in 1.4 beta. The heights of plain, italic, and
bold italic fonts were all the same in 1.3.1, but are
all different in 1.4 beta. The problem also shows up
for Lucida Sans and Lucida Sans Typewriter, but not
for other fonts.
Example code:
import java.awt.*;
import javax.swing.*;
public class FontBug {
static void main(String[] args) {
JDialog dialog = new JDialog();
dialog.setVisible(true);
Graphics graphics = dialog.getGraphics();
System.out.println("plain height " +
graphics.getFontMetrics(new Font("Courier", Font.PLAIN,
12)).getHeight());
System.out.println("italic height " +
graphics.getFontMetrics(new Font("Courier", Font.ITALIC,
12)).getHeight());
System.out.println("bold height " +
graphics.getFontMetrics(new Font("Courier", Font.BOLD,
12)).getHeight());
System.out.println("bold italic height " +
graphics.getFontMetrics(new Font("Courier", Font.BOLD |
Font.ITALIC, 12)).getHeight());
}
}
jdk 1.4 beta output:
plain height 15
italic height 23
bold height 15
bold italic height 17
jdk 1.3.1 output:
plain height 13
italic height 13
bold height 13
bold italic height 13
(Review ID: 129315)
======================================================================
- duplicates
-
JDK-4469005 JDK1.4 Lucida Oblique fonts have incorrect line height
-
- Resolved
-