Convert TTY status to Xft

This commit is contained in:
Ray Chason
2026-08-19 09:37:40 +03:00
committed by Pasi Kallinen
parent e53b76b0e5
commit 9d1aac189e
4 changed files with 126 additions and 12 deletions
+14 -1
View File
@@ -752,11 +752,22 @@ nhFreePixel(
* assumption of ascent + descent is not always valid.
*/
Dimension
nhFontHeight(Widget w)
nhFontHeight(Widget w, int win_type)
{
#ifdef USE_XFT
XftFont *font = X11_new_font(w, 0, win_type);
Dimension height = font->height;
X11_release_font(w, font);
return height;
#else /* !USE_XFT */
Arg args[1];
XFontStruct *fs;
nhUse(win_type);
#ifdef _XawTextSink_h
Widget sink = NULL;
XawTextPosition pos = 0;
@@ -776,6 +787,8 @@ nhFontHeight(Widget w)
/* Assume font height is ascent + descent. */
return fs->ascent + fs->descent;
#endif /* ?USE_XFT */
}
static String *default_resource_data = 0, /* NULL-terminated arrays */