]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): When displaying unibyte text
authorGerd Moellmann <gerd@gnu.org>
Fri, 31 Mar 2000 11:52:58 +0000 (11:52 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 31 Mar 2000 11:52:58 +0000 (11:52 +0000)
or ASCII, handle case that per-char metric is NULL.

src/xterm.c

index ed08485904d03462888b164901409ceedd5cbe66..b6714b84beea0f6f7ae509155953c5e20c0d98d2 100644 (file)
@@ -1823,9 +1823,20 @@ x_produce_glyphs (it)
          pcm = x_per_char_metric (font, &char2b);
          it->ascent = font->ascent + boff;
          it->descent = font->descent - boff;
-         it->phys_ascent = pcm->ascent + boff;
-         it->phys_descent = pcm->descent - boff;
-         it->pixel_width = pcm->width;
+
+         if (pcm)
+           {
+             it->phys_ascent = pcm->ascent + boff;
+             it->phys_descent = pcm->descent - boff;
+             it->pixel_width = pcm->width;
+           }
+         else
+           {
+             it->glyph_not_available_p = 1;
+             it->phys_ascent = font->ascent + boff;
+             it->phys_descent = font->descent - boff;
+             it->pixel_width = FONT_WIDTH (font);
+           }
 
          /* If this is a space inside a region of text with
             `space-width' property, change its width.  */