diff options
| author | Gerd Moellmann | 2000-03-31 11:52:58 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-03-31 11:52:58 +0000 |
| commit | 474848acee267167c1a042b1ef0f33f867e49495 (patch) | |
| tree | a87780fac9356846b5eb4eb9c7cdc09056848248 /src | |
| parent | ba74d3e36a2d3d1ae68a8268c3cf6c5a2b562cd0 (diff) | |
| download | emacs-474848acee267167c1a042b1ef0f33f867e49495.tar.gz emacs-474848acee267167c1a042b1ef0f33f867e49495.zip | |
(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.c | 17 |
1 files changed, 14 insertions, 3 deletions
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) | |||
| 1823 | pcm = x_per_char_metric (font, &char2b); | 1823 | pcm = x_per_char_metric (font, &char2b); |
| 1824 | it->ascent = font->ascent + boff; | 1824 | it->ascent = font->ascent + boff; |
| 1825 | it->descent = font->descent - boff; | 1825 | it->descent = font->descent - boff; |
| 1826 | it->phys_ascent = pcm->ascent + boff; | 1826 | |
| 1827 | it->phys_descent = pcm->descent - boff; | 1827 | if (pcm) |
| 1828 | it->pixel_width = pcm->width; | 1828 | { |
| 1829 | it->phys_ascent = pcm->ascent + boff; | ||
| 1830 | it->phys_descent = pcm->descent - boff; | ||
| 1831 | it->pixel_width = pcm->width; | ||
| 1832 | } | ||
| 1833 | else | ||
| 1834 | { | ||
| 1835 | it->glyph_not_available_p = 1; | ||
| 1836 | it->phys_ascent = font->ascent + boff; | ||
| 1837 | it->phys_descent = font->descent - boff; | ||
| 1838 | it->pixel_width = FONT_WIDTH (font); | ||
| 1839 | } | ||
| 1829 | 1840 | ||
| 1830 | /* If this is a space inside a region of text with | 1841 | /* If this is a space inside a region of text with |
| 1831 | `space-width' property, change its width. */ | 1842 | `space-width' property, change its width. */ |