forked from pool/xemacs
87 lines
3.1 KiB
Diff
87 lines
3.1 KiB
Diff
diff -ru xemacs-21.5.28.20080401.orig//lwlib/xlwmenu.c xemacs-21.5.28.20080401/lwlib/xlwmenu.c
|
|
--- xemacs-21.5.28.20080401.orig//lwlib/xlwmenu.c 2008-04-01 19:40:35.000000000 +0200
|
|
+++ xemacs-21.5.28.20080401/lwlib/xlwmenu.c 2009-01-21 18:01:16.000000000 +0100
|
|
@@ -332,12 +332,12 @@
|
|
#else
|
|
# ifdef USE_XFONTSET
|
|
XRectangle ri, rl;
|
|
- XmbTextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl);
|
|
+ Xutf8TextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl);
|
|
return rl.width;
|
|
# else
|
|
#ifdef USE_XFT_MENUBARS
|
|
XGlyphInfo glyphinfo;
|
|
- XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) s,
|
|
+ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) s,
|
|
strlen (s), &glyphinfo);
|
|
return glyphinfo.xOff;
|
|
#else
|
|
@@ -424,11 +424,11 @@
|
|
return width;
|
|
#else
|
|
# ifdef USE_XFONTSET
|
|
- XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl);
|
|
+ Xutf8TextExtents (mw->menu.font_set, newchars, j, &ri, &rl);
|
|
return rl.width;
|
|
# else /* ! USE_XFONTSET */
|
|
#ifdef USE_XFT_MENUBARS
|
|
- XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
|
|
+ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
|
|
j, &glyphinfo);
|
|
return glyphinfo.xOff;
|
|
#else
|
|
@@ -758,7 +758,7 @@
|
|
{
|
|
static XGlyphInfo glyphinfo;
|
|
|
|
- XftTextExtents8 (dpy,
|
|
+ XftTextExtentsUtf8 (dpy,
|
|
xft_font,
|
|
(FcChar8 *) run, len, &glyphinfo);
|
|
return glyphinfo.xOff;
|
|
@@ -805,12 +805,12 @@
|
|
x_xft_text_width (display, renderFont, string, strlen (string)),
|
|
renderFont->ascent + renderFont->descent); /* XXX */
|
|
/* draw text */
|
|
- XftDrawString8 (xftDraw, color, renderFont, x, y + mw->menu.font_ascent,
|
|
+ XftDrawStringUtf8 (xftDraw, color, renderFont, x, y + mw->menu.font_ascent,
|
|
(FcChar8 *) string, strlen (string));
|
|
XftDrawDestroy (xftDraw);
|
|
# else
|
|
# ifdef USE_XFONTSET
|
|
- XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc,
|
|
+ Xutf8DrawString (XtDisplay (mw), window, mw->menu.font_set, gc,
|
|
x, y + mw->menu.font_ascent, string, strlen (string));
|
|
# else
|
|
XDrawString (XtDisplay (mw), window, gc,
|
|
@@ -866,10 +866,10 @@
|
|
|
|
if (end <= start)
|
|
return 0;
|
|
- XmbDrawString (
|
|
+ Xutf8DrawString (
|
|
XtDisplay (mw), window, mw->menu.font_set, gc,
|
|
x, y + mw->menu.font_ascent, &string[start], end - start);
|
|
- XmbTextExtents (
|
|
+ Xutf8TextExtents (
|
|
mw->menu.font_set, &string[start], end - start, &ri, &rl);
|
|
return rl.width;
|
|
# else
|
|
@@ -892,12 +892,12 @@
|
|
renderFont, &string[start], end - start),
|
|
renderFont->ascent + renderFont->descent); /* XXX */
|
|
/* draw text */
|
|
- XftDrawString8 (xftDraw, color, renderFont,
|
|
+ XftDrawStringUtf8 (xftDraw, color, renderFont,
|
|
x, y + mw->menu.font_ascent,
|
|
(FcChar8 *) &string[start], end - start);
|
|
|
|
- XftTextExtents8 (display, renderFont, (FcChar8 *) &string[start],
|
|
- end - start, &glyphinfo);
|
|
+ XftTextExtentsUtf8 (display, renderFont, (FcChar8 *) &string[start],
|
|
+ end - start, &glyphinfo);
|
|
|
|
/* #### should use parent frame's .xftDraw */
|
|
XftDrawDestroy (xftDraw);
|
|
xemacs-21.5.28.20080401/lwlibだけに発見: xlwmenu.c.~1~
|