comparison src/xterm.c @ 28443:17fb2089c222

(x_produce_glyphs): When displaying unibyte text or ASCII, handle case that per-char metric is NULL.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 31 Mar 2000 11:52:58 +0000
parents 4b675266db04
children 437e522505fb
comparison
equal deleted inserted replaced
28442:efd5a62ccce9 28443:17fb2089c222
1821 it->nglyphs = 1; 1821 it->nglyphs = 1;
1822 1822
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. */
1832 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width); 1843 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width);
1833 if (stretched_p) 1844 if (stretched_p)