-
Bug
-
Resolution: Not an Issue
-
P1
-
None
-
1.2.3
-
x86
-
generic
Name: clC74495 Date: 09/14/99
=20
The applet made by using JDK1.1.2 dosen't work properly when=20
using Java plug-in(ver1.2.2), in the following case;
The height of cell which is obtained by FontMetrics.getHeight()=20
method is not correct.
Also FontMetrics.getDescent(),FontMetrics.getAscent() is not
correct.
Here are examples of behavior of getXXX() method.
NetcapeJDK1.1 JavaPlug-in1.2.2
schemeFM.getHeight() 14(true) 20=81ifalse=81j
schemeFM.getDescent() =81@2(true) 5=81ifalse=81j
schemeFM.getAscent() 2(true) 5=81ifalse=81j
Sample source code which includes getHeight() method is below;
public class getHeightApplet extends Applet {
public static final Font LIST_FONT =3D new Font("monospaced", Font.PLAIN,=
14);
private final Font SCHEMEFONT =3D LIST_FONT; // font for cell
// metrics of font for cell
private FontMetrics schemeFM =3D this.getFontMetrics(SCHEMEFONT);
private Label label1 =3D new Label( "Font Size =3D 14" );
private Label lblHeight =3D new Label();
//architect of applet
public getHeightApplet() {
add( label1 );
add( lblHeight );
lblHeight.setText( "getHeight()=3D" + schemeFM.getHeight() );
}
//initialize applet
public void init() {
}
}
(Review ID: 95227)=20
======================================================================
- relates to
-
JDK-4486745 java : win32 Java2 fontmetrics fix caused difference from 1.1.8 platform metrics
-
- Resolved
-