aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-10 02:15:40 +0000
committerRichard M. Stallman1997-07-10 02:15:40 +0000
commitfe27f88d3a3b8892bc20fb18563c4070a4b7d887 (patch)
tree972a93f88808fccc6efc48c1a6e0ccfbeb39c525 /src
parent5d7cc324addae95918b29fed2dce7d5a3e03ef5b (diff)
downloademacs-fe27f88d3a3b8892bc20fb18563c4070a4b7d887.tar.gz
emacs-fe27f88d3a3b8892bc20fb18563c4070a4b7d887.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 43e4430e134..2a32bcefe2d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -760,7 +760,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
760 font = FACE_FONT (face); 760 font = FACE_FONT (face);
761 if (font == (XFontStruct *) FACE_DEFAULT) 761 if (font == (XFontStruct *) FACE_DEFAULT)
762 font = f->output_data.x->font; 762 font = f->output_data.x->font;
763 baseline = FONT_BASE (font); 763 baseline = FONT_BASE (f->output_data.x->font);
764 if (charset == charset_latin_iso8859_1) 764 if (charset == charset_latin_iso8859_1)
765 { 765 {
766 if (font->max_char_or_byte2 < 0x80) 766 if (font->max_char_or_byte2 < 0x80)
@@ -865,8 +865,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
865 { 865 {
866 /* Fill a area for the current run in background pixle of GC. */ 866 /* Fill a area for the current run in background pixle of GC. */
867 XGCValues xgcv; 867 XGCValues xgcv;
868 unsigned long mask = GCForeground | GCBackground; 868 unsigned long mask = GCForeground | GCBackground | GCFillStyle;
869 unsigned long fore, back;
870 869
871 /* The current code at first set foreground to background, 870 /* The current code at first set foreground to background,
872 fill the area, then recover the original foreground. 871 fill the area, then recover the original foreground.
@@ -874,6 +873,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
874 873
875 XGetGCValues (FRAME_X_DISPLAY (f), gc, mask, &xgcv); 874 XGetGCValues (FRAME_X_DISPLAY (f), gc, mask, &xgcv);
876 XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.background); 875 XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.background);
876 XSetFillStyle (FRAME_X_DISPLAY (f), gc, FillSolid);
877 XFillRectangle (FRAME_X_DISPLAY (f), window, gc, 877 XFillRectangle (FRAME_X_DISPLAY (f), window, gc,
878 left, top, run_width, line_height); 878 left, top, run_width, line_height);
879 XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground); 879 XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground);
@@ -6547,7 +6547,7 @@ x_load_font (f, fontname, size)
6547 fontp->full_name = fontp->name; 6547 fontp->full_name = fontp->name;
6548 6548
6549 fontp->size = font->max_bounds.width; 6549 fontp->size = font->max_bounds.width;
6550 fontp->height = font->ascent + font->descent; 6550 fontp->height = font->max_bounds.ascent + font->max_bounds.descent;
6551 6551
6552 if (NILP (font_names)) 6552 if (NILP (font_names))
6553 { 6553 {