]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): Consider face-remapping when falling
authorKenichi Handa <handa@m17n.org>
Tue, 17 Nov 2009 04:17:19 +0000 (04:17 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 17 Nov 2009 04:17:19 +0000 (04:17 +0000)
back to the default font in case that no suitable font is found.

src/ChangeLog
src/xdisp.c

index d74c3da92aac62113d19f415a5924e02f7e8c47b..0bc2ad403e7809cf5576f4add2718e9dddfd53c5 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-17  Kenichi Handa  <handa@m17n.org>
+
+       * xdisp.c (x_produce_glyphs): Consider face-remapping when falling
+       back to the default font in case that no suitable font is found.
+
 2009-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * menu.c (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge.
index 28fdcfae49db5d5b4b3e550aa5f2a7499874a883..d2ae9a18fe226488f2141603f9026dec48641453 100644 (file)
@@ -21149,12 +21149,18 @@ x_produce_glyphs (it)
                                  &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 @@ x_produce_glyphs (it)
                   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;
            }