changeset 18706:4af0aa969bbe

(x_load_font): Get value of fontp->height from ascent and descent members of structure font->max_bounds. (dumpglyphs): Draw background by FillSolid if a font is too short.
author Richard M. Stallman <rms@gnu.org>
date Thu, 10 Jul 1997 02:15:40 +0000
parents c4f2eab8e736
children 23039b06955a
files src/xterm.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Thu Jul 10 02:13:26 1997 +0000
+++ b/src/xterm.c	Thu Jul 10 02:15:40 1997 +0000
@@ -760,7 +760,7 @@
 		font = FACE_FONT (face);
 		if (font == (XFontStruct *) FACE_DEFAULT)
 		  font = f->output_data.x->font;
-		baseline = FONT_BASE (font);
+		baseline = FONT_BASE (f->output_data.x->font);
 		if (charset == charset_latin_iso8859_1)
 		  {
 		    if (font->max_char_or_byte2 < 0x80)
@@ -865,8 +865,7 @@
 	  {
 	    /* Fill a area for the current run in background pixle of GC.  */
 	    XGCValues xgcv;
-	    unsigned long mask = GCForeground | GCBackground;
-	    unsigned long fore, back;
+	    unsigned long mask = GCForeground | GCBackground | GCFillStyle;
 
 	    /* The current code at first set foreground to background,
 	      fill the area, then recover the original foreground.
@@ -874,6 +873,7 @@
 
 	    XGetGCValues (FRAME_X_DISPLAY (f), gc, mask, &xgcv);
 	    XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.background);
+	    XSetFillStyle (FRAME_X_DISPLAY (f), gc, FillSolid);
 	    XFillRectangle (FRAME_X_DISPLAY (f), window, gc,
 			    left, top, run_width, line_height);
 	    XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground);
@@ -6547,7 +6547,7 @@
       fontp->full_name = fontp->name;
 
     fontp->size = font->max_bounds.width;
-    fontp->height = font->ascent + font->descent;
+    fontp->height = font->max_bounds.ascent + font->max_bounds.descent;
 
     if (NILP (font_names))
       {