SHA256
1
0
forked from pool/xemacs
xemacs/menus-always-utf8.patch

109 lines
4.1 KiB
Diff
Raw Permalink Normal View History

Index: xemacs-21.5.31/lwlib/xlwmenu.c
===================================================================
--- xemacs-21.5.31/lwlib/xlwmenu.c
+++ xemacs-21.5.31/lwlib/xlwmenu.c
@@ -108,7 +108,7 @@ xlwMenuResources[] =
/* We must use an iso8859-1 font here, or people without $LANG set lose.
It's fair to assume that those who do have $LANG set also have the
*fontList resource set, or at least know how to deal with this. */
- XtRString, (XtPointer) "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1"),
+ XtRString, (XtPointer) "-*-helvetica-bold-r-*--*-120-*-*-*-*-*-*"),
#else
fontres (XtNfont, XtCFont, XtRFontStruct, XFontStruct *, font,
"XtDefaultFont"),
@@ -343,12 +343,12 @@ string_width (XlwMenuWidget mw,
#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 HAVE_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
@@ -435,11 +435,11 @@ string_width_u (XlwMenuWidget mw,
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 HAVE_XFT_MENUBARS
- XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
+ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
j, &glyphinfo);
return glyphinfo.xOff;
#else
@@ -769,7 +769,7 @@ x_xft_text_width (Display *dpy, XftFont
{
static XGlyphInfo glyphinfo;
- XftTextExtents8 (dpy,
+ XftTextExtentsUtf8 (dpy,
xft_font,
(FcChar8 *) run, len, &glyphinfo);
return glyphinfo.xOff;
@@ -816,12 +816,12 @@ string_draw (XlwMenuWidget mw,
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,
@@ -877,10 +877,10 @@ string_draw_range (
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
@@ -903,12 +903,12 @@ string_draw_range (
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);
Index: xemacs-21.5.31/src/faces.c
===================================================================
--- xemacs-21.5.31/src/faces.c
+++ xemacs-21.5.31/src/faces.c
@@ -2484,7 +2484,7 @@ complex_vars_of_faces (void)
Fcons
(Fcons
(list1 (device_symbol),
- build_ascstring ("-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*")),
+ build_ascstring ("-*-fixed-medium-r-*--*-120-*-*-*-*-*-*")),
inst_list);
#endif /* !HAVE_XFT */