-
Bug
-
Resolution: Fixed
-
P4
-
1.1.8
-
1.2
-
sparc
-
solaris_2.5.1, solaris_7
-
Verified
Name: vsC97678 Date: 12/06/99
This bug is filed only for tracking purposes, the fix has already been
integrated in jdk1.2, so feel free to close it as such.
On Solaris, Graphics.drawBytes ignores a current font if it differs
from the default.
This bug is reproducible with jdk1.1.8.
The following code example demostrates the bug:
----------------- TestGraphics.java -------------------
import java.awt.Frame;
import java.awt.Panel;
import java.awt.Font;
import java.awt.Graphics;
public class TestGraphics extends Frame {
public static void main(String[] argv) {
TestGraphics tg = new TestGraphics();
MyPanel p = new MyPanel();
tg.add(p);
tg.setSize(300, 300);
tg.setVisible(true);
}
}
class MyPanel extends Panel {
public void paint(Graphics g) {
g.setFont(new Font("Serif", Font.ITALIC, 20));
g.drawBytes("Test drawBytes".getBytes(), 0, "Test drawBytes".length(), 100, 200);
g.drawString("Test drawString", 100, 100);
}
}
--------------------------------------------------------
======================================================================
- duplicates
-
JDK-4217577 drawbytes does not use the current font
-
- Closed
-