# HG changeset patch # User mhessling@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1051779896 0 # Node ID f040c24bcf26370f268706f9da5d2d522bdf6407 # Parent 838781d4f1dc4a79a6e52d734e7bea909383498c Slight change to determining font height under GTK 1.2. The solution may not work correctly for all fonts (only tested with fixed font). diff -r 838781d4f1dc -r f040c24bcf26 gtk/dw.c --- a/gtk/dw.c Wed Apr 30 04:08:52 2003 +0000 +++ b/gtk/dw.c Thu May 01 09:04:56 2003 +0000 @@ -5431,7 +5431,7 @@ */ gdk_text_extents(font, text, strlen(text), NULL, NULL, &width, &junk_ascent, &junk_descent); /* force ascent/descent to be maximum values */ - gdk_text_extents(font, "Xg", 2, NULL, NULL, &junk_width, &ascent, &descent); + gdk_text_extents(font, "(g", 2, NULL, NULL, &junk_width, &ascent, &descent); if(!_transparent[index]) { GdkGC *gc2 = NULL; @@ -5442,10 +5442,10 @@ gdk_gc_set_foreground(gc2, &_background[index]); gdk_gc_set_background(gc2, &_background[index]); } - gdk_draw_rectangle(handle ? handle->window : pixmap->pixmap, gc2, TRUE, x, y, width, ascent + descent + 2); + gdk_draw_rectangle(handle ? handle->window : pixmap->pixmap, gc2, TRUE, x, y, width, ascent + descent + 1); gdk_gc_unref(gc2); } - gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 2, text, strlen(text)); + gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 1, text, strlen(text)); gdk_font_unref(font); } #endif