aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-03-31 11:52:58 +0000
committerGerd Moellmann <[email protected]>2000-03-31 11:52:58 +0000
commit474848acee267167c1a042b1ef0f33f867e49495 (patch)
treea87780fac9356846b5eb4eb9c7cdc09056848248 /src
parentba74d3e36a2d3d1ae68a8268c3cf6c5a2b562cd0 (diff)
(x_produce_glyphs): When displaying unibyte text
or ASCII, handle case that per-char metric is NULL.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index ed08485904..b6714b84be 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. */