Hello ,Kaffe VM developers. I made AWT internationalization patch. Now ,we can't use multibyte character for X on Kaffe AWT. Principal reason is that Kaffe's AWT have been constructed under single font model. I made a patch for this problem. It uses XwcDrawString instead of XDrawString16. If you are interested in it, please chec kattached file. And you must modify following line at Default.java for your fontset when you use this patch. for example: original code at Default.java: 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; for japanese(kandata font): String fntCat = Integer.toString(res) + '-' + res + "-*-*-*-*"; //FsDefault = "-b&h-lucida-%s-%s-*-*-*-%d-" + fntCat; FsDefault = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsMonospaced = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsSansSerif = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsSerif = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsDialog = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsDialogInput = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; FsZapfDingbats = "-misc-kandata-%s-%s-normal--*-%d-" + fntCat; Note: Specified fontset should include all style. (ex. -misc-kandata-medium-r-.. -misc-kandata-medium-i-.. -misc-kandata-bold-r-.. -misc-kandata-bold-i-..) I think default font should be modified by font.properties file (like SUN and IBM JDK). I also write main topic for this patch. in library/clib/awt/X/gra.c XDrawString16( X->dsp, gr->drw, gr->gc, x+gr->x0, y+gr->y0, b, len); XDrawString16 can't treat FontSet. It's only purpose for single font. So, it's not good for internationalization. I use XwcDrawString instead of XDrawString16. in library/clib/awt/X/fnt.c XFontStruct* fs = 0; -- snip -- fs = XLoadQueryFont( X->dsp, buf); We must use XOC or XFontSet instead of XFontStruct for XwcDrawString. I used XOC for font set. Regards. ---------------------------- Takashi Okamoto

kaffe-1.0.6-awt-X-multibyte-patch.tgz

Reply via email to