-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
generic
-
generic
Name: ca25432 Date: 03/13/2000
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O-release, 1.3beta-O-release,
interpreted mode)
Bug also occurs in:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, green threads, sunwjit)
(Note: This is the 3rd repost, because I didn't get an automatic receipt
notification)
The t2k font code supports (and is used for) type1 fonts, but for a type1 font
using adobe standard encoding it defaults to a "mac roman" glyph name to
charcode mapping.
If a java application uses such a type1 font that is handled by t2k, glyphs
displayed for non-ascii characters (i.e. outside the range \u0000 .. \u007f)
are all wrong.
TEST CASE:
Test case 1:
On a Solaris 7 system, run the Font2DTest.jar (from the recent windows
jdk1.3rc1) java application and select the "Lucida Sans Typewriter" font.
Note that the glyphs outside the unicode range \u0000 .. \u007f are all
wrong.
Test case 2:
Compile and run the following java program as 'java lucida':
----------------------------------------------------------
import java.awt.*;
public class lucida extends Canvas {
Font lucida14 = new Font("Lucida Sans Typewriter", Font.PLAIN, 14);
lucida() {
}
public Dimension getPreferredSize() { return new Dimension(300, 200); }
public void paint(Graphics g) {
g.setFont(lucida14);
g.drawString("7-bit ASCII: ABC abc", 5, 20);
g.drawString("8-bit 8859-1: ÄÖÜ äöü \u20ac", 5, 40);
g.drawString("u0100 Unicode: \u0100\u0101\u0102\u0103\u0104\u0105", 5,
60);
g.drawString("u0300 Unicode: \u03b0\u03b1\u03b2\u03b3\u03b4\u03b5", 5,
80);
g.drawString("u0500 Unicode: \u05d0\u05d1\u05d2\u05d3\u05d4\u05d5", 5,
100);
}
public static void main(String[] args) {
if (!Boolean.getBoolean("disable.getfontfam")) {
GraphicsEnvironment genv;
genv = GraphicsEnvironment.getLocalGraphicsEnvironment();
genv.getAvailableFontFamilyNames();
}
Frame f = new Frame("Test");
f.add(new lucida());
f.pack();
f.setVisible(true);
}
}
---------------------------------------
The 7-bit ASCII characters are displayed OK, the 8-bit iso8895-1 characters
(german umlauts in the example) are all wrong, unicode characters >= \u0100
are missing.
The /usr/openwin/lib/X11/fonts/Type1/sun/Lucida*.pfa type1 fonts, that are used
under Solaris7, support much more than 7-bit US Ascii characters!
RELATED BUGS:
4181596
4179255
4145552
(Review ID: 100953)
======================================================================