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.
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.
--
Glynn Clements <glynn(a)gclements.plus.com>
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta