Hi, Kaffe!! I have posted AWT internationalization patch already. But I haven't taken any reply. I post it again and I explain this patch more detail following URL: http://www.mycgiserver.com/~tora/java/diary/kaffe_en.html The problem is that Kaffe AWT can't display multibyte characters correctly. The principal reason is that Kaffe AWT use XDrawString16 and XFontStruct. I use XwcDrawString and XOC instead of these functions. Could you fix it, Kaffe developers? One more thing, we have following issue yet about AWT: - Font should be changed by external file (like font.properties.xx) for each locale. - Now we can't input multibyte character. We should use XIM ( XOpenXIM() ,XCreateXIC() ,XwcLookupString() ). Does anyone fix these problems? Please see above URL for more detail. thanks. --------------------- Takashi Okamoto ----- Original Message ----- From: "Takashi Okamoto" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 03, 2001 12:06 PM Subject: [PATCH] AWT DrawText Internationalization Problem > 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 + "-*-*-*-*"; > file://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 + "-*-*-*-*"; > file://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-I18N.patch

Reply via email to