[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src xdisp.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src xdisp.c |
Date: |
Tue, 17 Nov 2009 04:16:34 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 09/11/17 04:16:34
Modified files:
src : xdisp.c
Log message:
(x_produce_glyphs): Consider face-remapping when falling
back to the default font in case that no suitable font is found.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xdisp.c?cvsroot=emacs&r1=1.1320&r2=1.1321
Patches:
Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1320
retrieving revision 1.1321
diff -u -b -r1.1320 -r1.1321
--- xdisp.c 12 Nov 2009 02:09:36 -0000 1.1320
+++ xdisp.c 17 Nov 2009 04:16:33 -0000 1.1321
@@ -21149,12 +21149,18 @@
&char2b, it->multibyte_p, 0);
font = face->font;
- /* When no suitable font found, use the default font. */
font_not_found_p = font == NULL;
if (font_not_found_p)
{
- font = FRAME_FONT (it->f);
- boff = FRAME_BASELINE_OFFSET (it->f);
+ /* When no suitable font found, display an empty box based
+ on the metrics of the font of the default face (or what
+ remapped). */
+ struct face *no_font_face
+ = FACE_FROM_ID (it->f,
+ NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
+ : lookup_basic_face (it->f, DEFAULT_FACE_ID));
+ font = no_font_face->font;
+ boff = font->baseline_offset;
}
else
{
@@ -21425,7 +21431,7 @@
at least one column. */
char_width = 1;
it->glyph_not_available_p = 1;
- it->pixel_width = FRAME_COLUMN_WIDTH (it->f) * char_width;
+ it->pixel_width = font->space_width * char_width;
it->phys_ascent = FONT_BASE (font) + boff;
it->phys_descent = FONT_DESCENT (font) - boff;
}