Fix text metrics calculation in Xft support for lwlib
* lwlib/lwlib-Xaw.c (get_text_width_and_height) [HAVE_XFT]: * lwlib/xlwmenu.c (string_width) [HAVE_XFT]: Use xOff member instead of width.
This commit is contained in:
@@ -154,7 +154,7 @@ get_text_width_and_height (Widget widget, char *text,
|
||||
&gi);
|
||||
bp = cp ? cp + 1 : NULL;
|
||||
h += xft_font->height;
|
||||
if (w < gi.width) w = gi.width;
|
||||
if (w < gi.xOff) w = gi.xOff;
|
||||
}
|
||||
|
||||
*height = h;
|
||||
|
||||
@@ -332,7 +332,7 @@ string_width (XlwMenuWidget mw, char *s)
|
||||
XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.xft_font,
|
||||
(FcChar8 *) s,
|
||||
strlen (s), &gi);
|
||||
return gi.width;
|
||||
return gi.xOff;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_X_I18N
|
||||
|
||||
Reference in New Issue
Block a user