Mercurial > emacs
comparison src/xterm.c @ 22522:f56d8440c0a4
(dumpglyphs): Check the case that FACE_FONT (face) is
NULL. While displaing cursor with non-default face, if the
variable `font' is NULL, don't set GCFont.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 20 Jun 1998 03:01:00 +0000 |
parents | 104e277d77d3 |
children | 6d2e22a16952 |
comparison
equal
deleted
inserted
replaced
22521:da62a50f7cff | 22522:f56d8440c0a4 |
---|---|
781 { | 781 { |
782 font_not_found: | 782 font_not_found: |
783 if (charset == CHARSET_ASCII || charset == charset_latin_iso8859_1) | 783 if (charset == CHARSET_ASCII || charset == charset_latin_iso8859_1) |
784 { | 784 { |
785 font = FACE_FONT (face); | 785 font = FACE_FONT (face); |
786 if (font == (XFontStruct *) FACE_DEFAULT) | 786 if (!font || font == (XFontStruct *) FACE_DEFAULT) |
787 font = f->output_data.x->font; | 787 font = f->output_data.x->font; |
788 baseline = FONT_BASE (f->output_data.x->font); | 788 baseline = FONT_BASE (f->output_data.x->font); |
789 if (charset == charset_latin_iso8859_1) | 789 if (charset == charset_latin_iso8859_1) |
790 { | 790 { |
791 if (font->max_char_or_byte2 < 0x80) | 791 if (font->max_char_or_byte2 < 0x80) |
835 && xgcv.foreground == face->foreground) | 835 && xgcv.foreground == face->foreground) |
836 { | 836 { |
837 xgcv.background = face->foreground; | 837 xgcv.background = face->foreground; |
838 xgcv.foreground = face->background; | 838 xgcv.foreground = face->background; |
839 } | 839 } |
840 xgcv.graphics_exposures = 0; | |
841 mask = GCForeground | GCBackground | GCGraphicsExposures; | |
840 if (font) | 842 if (font) |
841 xgcv.font = font->fid; | 843 { |
842 else | 844 xgcv.font = font->fid; |
843 xgcv.font = FACE_FONT (face)->fid; | 845 mask |= GCFont; |
844 xgcv.graphics_exposures = 0; | 846 } |
845 mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures; | 847 |
846 if (FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc) | 848 if (FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc) |
847 XChangeGC (FRAME_X_DISPLAY (f), | 849 XChangeGC (FRAME_X_DISPLAY (f), |
848 FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc, | 850 FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc, |
849 mask, &xgcv); | 851 mask, &xgcv); |
850 else | 852 else |