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:
parent
6a373e4742
commit
21db386ac0
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue