From: Gerd Moellmann Date: Fri, 31 Mar 2000 11:52:58 +0000 (+0000) Subject: (x_produce_glyphs): When displaying unibyte text X-Git-Tag: emacs-pretest-21.0.90~4383 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=474848acee267167c1a042b1ef0f33f867e49495;p=emacs.git (x_produce_glyphs): When displaying unibyte text or ASCII, handle case that per-char metric is NULL. --- diff --git a/src/xterm.c b/src/xterm.c index ed08485904d..b6714b84bee 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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. */