aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-11-17 04:17:19 +0000
committerKenichi Handa2009-11-17 04:17:19 +0000
commit5a94293248c904fce13c611063c819cae877cf62 (patch)
tree9380c41f7f5a44843f25bed314eb27b2c1ae7337 /src
parentb7c7a4d1f85dfb6666c84da48b4c15320f9b4603 (diff)
downloademacs-5a94293248c904fce13c611063c819cae877cf62.tar.gz
emacs-5a94293248c904fce13c611063c819cae877cf62.zip
(x_produce_glyphs): Consider face-remapping when falling
back to the default font in case that no suitable font is found.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c14
2 files changed, 15 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d74c3da92aa..0bc2ad403e7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-11-17 Kenichi Handa <handa@m17n.org>
2
3 * xdisp.c (x_produce_glyphs): Consider face-remapping when falling
4 back to the default font in case that no suitable font is found.
5
12009-11-17 Stefan Monnier <monnier@iro.umontreal.ca> 62009-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * menu.c (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge. 8 * menu.c (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge.
diff --git a/src/xdisp.c b/src/xdisp.c
index 28fdcfae49d..d2ae9a18fe2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21149,12 +21149,18 @@ x_produce_glyphs (it)
21149 &char2b, it->multibyte_p, 0); 21149 &char2b, it->multibyte_p, 0);
21150 font = face->font; 21150 font = face->font;
21151 21151
21152 /* When no suitable font found, use the default font. */
21153 font_not_found_p = font == NULL; 21152 font_not_found_p = font == NULL;
21154 if (font_not_found_p) 21153 if (font_not_found_p)
21155 { 21154 {
21156 font = FRAME_FONT (it->f); 21155 /* When no suitable font found, display an empty box based
21157 boff = FRAME_BASELINE_OFFSET (it->f); 21156 on the metrics of the font of the default face (or what
21157 remapped). */
21158 struct face *no_font_face
21159 = FACE_FROM_ID (it->f,
21160 NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
21161 : lookup_basic_face (it->f, DEFAULT_FACE_ID));
21162 font = no_font_face->font;
21163 boff = font->baseline_offset;
21158 } 21164 }
21159 else 21165 else
21160 { 21166 {
@@ -21425,7 +21431,7 @@ x_produce_glyphs (it)
21425 at least one column. */ 21431 at least one column. */
21426 char_width = 1; 21432 char_width = 1;
21427 it->glyph_not_available_p = 1; 21433 it->glyph_not_available_p = 1;
21428 it->pixel_width = FRAME_COLUMN_WIDTH (it->f) * char_width; 21434 it->pixel_width = font->space_width * char_width;
21429 it->phys_ascent = FONT_BASE (font) + boff; 21435 it->phys_ascent = FONT_BASE (font) + boff;
21430 it->phys_descent = FONT_DESCENT (font) - boff; 21436 it->phys_descent = FONT_DESCENT (font) - boff;
21431 } 21437 }