Glynn Clements <glynn(a)gclements.plus.com> さんは書きました:
Stephen J. Turnbull wrote:
> > I am using the Xft support in XEmacs for a long time already
> > and like a lot.
> >
> > But until now I always disabled it for the menus because
> > I couldn’t figure out how to make it work for the translated menus.
>
> It doesn't work, AFAIK. That's one of the reasons I opposed putting
> Xft into the mainline way back when.
>
> Working around it might be as easy as replacing calls to
> XftDrawString8 with XftDrawStringUtf8 in lwlib/xlwmenu.c.
XftDrawString8() assumes that the text is ISO-8859-1 (specifically, it
treats each byte as a unicode codepoint). If you have text in some
other encoding, you need to convert it to unicode yourself.
Obviously, using XftDrawStringUtf8 will fail if the text isn't in
UTF-8. While nothing prevents you from specifying menu labels in UTF-8
regardless of the locale's encoding, editing the app-defaults file is
likely to be a pain if it contains text in multiple encodings.
I think making the app-defaults files *always* UTF-8 *only* is
the best solution here.
Using mbstowcs() and XftDrawString32 wouldn't be much more
complex,
and should handle most cases, i.e. so long as wchar_t is UCS-4 and
setlocale(LC_CTYPE,"") is in effect.
Then you need differently encoded app-defaults files for e.g.
de_DE and de_DE.UTF-8 locale. This is an unnecessary complexity
in my opinion. One file in UTF-8 encoding seems cleaner to me.
--
Mike FABIAN <mfabian(a)suse.de>
http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
I � Unicode
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta