-
Bug
-
Resolution: Fixed
-
P3
-
1.3.1_04
-
1.4
-
generic
-
solaris_7
-
Not verified
Java 1.3.1 is unable to display 8bit umlauts in font "Lucida Sans Typewriter"
and "Lucida Sans", if package SUNWi1of is installed.
The problem can be easily reproduced:
1. Testcase
-----------
% more test.java
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class test extends Frame {
Font f1, f2, f3, f4, f5, f6;
public test() {
f1 = new Font("Times New Roman", Font.PLAIN, 10);
f2 = new Font("SansSerif", Font.PLAIN, 10);
f3 = new Font("Lucida Console", Font.PLAIN, 10);
f4 = new Font("Lucida Sans Typewriter", Font.PLAIN, 10);
f5 = new Font("Lucida", Font.PLAIN, 10);
f6 = new Font("Lucida Sans", Font.PLAIN, 10);
setVisible(true);
}
public void paint(Graphics g) {
g.setFont(f1);
drawString(g, "Times New Roman", 60);
g.setFont(f2);
drawString(g, "SansSerif", 80);
g.setFont(f3);
drawString(g, "Lucida Console", 100);
g.setFont(f4);
drawString(g, "Lucida Sans Typewriter", 120);
g.setFont(f5);
drawString(g, "Lucida", 140);
g.setFont(f6);
drawString(g, "Lucida Sans", 160);
}
public void drawString(Graphics g, String s, int y) {
String t = "\344\366\374 \u00C4\u00D6\u00DC\u00C5\u00e4\u00f6\u00fc\u00df";
g.drawString(s + ": " + t, 10, y);
}
public static void main(String argv[]) {
test t = new test();
Graphics g = t.getGraphics();
t.setSize(200, 100);
t.paint(g);
t.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
%
2. Compile and run
------------------
The problem is only reproducible, if SUNWi1of is present.
% pkginfo SUNWi1of
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
%
% /j2sdk1_3_1_04/bin/java -version
java version "1.3.1_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_04-b02)
Java HotSpot(TM) Client VM (build 1.3.1_04-b02, mixed mode)
/j2sdk1_3_1_04/bin/javac test.java
%
% /j2sdk1_3_1_04/bin/java test
a window will pop up, listing six lines:
(The umlaut charcters are paraphrased in the following.)
"Times New Roman: <some 8bit characters "o"a"u "A"O"U°A"a"o"u"s>"
"SansSerif: <some 8bit characters "o"a"u "A"O"U°A"a"o"u"s>"
"Lucida Console: <some 8bit characters "o"a"u "A"O"U°A"a"o"u"s>"
"Lucida Sans Typewriter: <some strange characters>"
"Lucida: <some 8bit characters "o"a"u "A"O"U°A"a"o"u"s>"
"Lucida Sans: <some strange characters>"
Select WindowManager->close to exit.
The behaviour is independent of the locale at compiletime or at runtime.
- relates to
-
JDK-4457181 Unicode Combining Diacritics are not rendered
- Closed