Xft digit width



This patch is needed to make with width of GtkSpinButtons sane when using
Xft fonts. It is not perfect, but better than nothing. Can i commit it?

/ Alex

Index: pangoxft-font.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangoxft-font.c,v
retrieving revision 1.4
diff -u -p -r1.4 pangoxft-font.c
--- pangoxft-font.c	2000/12/20 04:41:35	1.4
+++ pangoxft-font.c	2001/04/20 15:42:51
@@ -289,6 +289,8 @@ pango_xft_font_get_metrics (PangoFont

   metrics->ascent = PANGO_SCALE * xfont->xft_font->ascent;
   metrics->descent = PANGO_SCALE * xfont->xft_font->descent;
+  metrics->approximate_digit_width = PANGO_SCALE * xfont->xft_font->max_advance_width;
+  metrics->approximate_char_width = PANGO_SCALE * xfont->xft_font->max_advance_width;

   return;
 }






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]