[kaffe] i18n patches for X AWT backend
Ito Kazumitsu
kaz at maczuka.gcd.org
Fri Mar 5 15:22:02 PST 2004
Atsushi Nemoto wrote:
>> 3. good way to override default font names (not designed/implemented yet...)
Although I am far from confident about it, I did the following
--- java/awt/Defaults.java.orig Fri Jan 4 14:12:19 2002
+++ java/awt/Defaults.java Sat Mar 6 07:49:21 2004
@@ -424,13 +424,20 @@
String fntCat = Integer.toString(res) + '-' + res + "-*-*-*-*";
//FsDefault = "-b&h-lucida-%s-%s-*-*-*-%d-" + fntCat;
- FsDefault = "-adobe-helvetica-%s-%s-*-*-*-%d-" + fntCat;
- FsMonospaced = "-adobe-courier-%s-%s-*-*-*-%d-" + fntCat;
- FsSansSerif = "-adobe-helvetica-%s-%s-*-*-*-%d-" + fntCat;
- FsSerif = "-adobe-times-%s-%s-*-*-*-%d-" + fntCat;
- FsDialog = "-misc-fixed-%s-%s-*-*-*-%d-" + fntCat;
- FsDialogInput = "-b&h-lucidatypewriter-%s-%s-*-*-*-%d-" + fntCat;
- FsZapfDingbats = "-adobe-new century schoolbook-%s-%s-*-*-*-%d-" + fntCat;
+ FsDefault = System.getProperty("user.java.awt.X.FsDefault",
+ "-adobe-helvetica-%s-%s-*-*-*-%d-") + fntCat;
+ FsMonospaced = System.getProperty("user.java.awt.X.FsMonospaced",
+ "-adobe-courier-%s-%s-*-*-*-%d-") + fntCat;
+ FsSansSerif = System.getProperty("user.java.awt.X.FsSansSerif",
+ "-adobe-helvetica-%s-%s-*-*-*-%d-") + fntCat;
+ FsSerif = System.getProperty("user.java.awt.X.FsSerif",
+ "-adobe-times-%s-%s-*-*-*-%d-") + fntCat;
+ FsDialog = System.getProperty("user.java.awt.X.FsDialog",
+ "-misc-fixed-%s-%s-*-*-*-%d-") + fntCat;
+ FsDialogInput = System.getProperty("user.java.awt.X.FsDialogInput",
+ "-b&h-lucidatypewriter-%s-%s-*-*-*-%d-") + fntCat;
+ FsZapfDingbats = System.getProperty("user.java.awt.X.FsZapfDingbats",
+ "-adobe-new century schoolbook-%s-%s-*-*-*-%d-") + fntCat;
}
else {
// no idea, we have to leave it for the native layer
And my test results are as follows.
Font settings:
FONT="-jis-fixed-medium-r-normal--*-%d-"
java \
-Duser.java.awt.X.FsDefault=$FONT \
-Duser.java.awt.X.FsMonospaced=$FONT \
-Duser.java.awt.X.FsSansSerif=$FONT \
-Duser.java.awt.X.FsSerif=$FONT \
-Duser.java.awt.X.FsDialog=$FONT \
-Duser.java.awt.X.FsDialogInput=$FONT \
-Duser.java.awt.X.FsZapfDingbats=$FONT \
Test case 1: Jim's patch + Atsushi's strerror patch
The expected window opens but Japanese text cannot be displayed.
Test case 2: Atsushi's patch only
The following message appears endlessly and the expected window
does not open.
XCreateOC error at -jis-fixed-medium-r-normal--*-678020921-75-75-*-*-*-*.
More information about the kaffe
mailing list