Commit 474848ac authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(x_produce_glyphs): When displaying unibyte text

or ASCII, handle case that per-char metric is NULL.
parent ba74d3e3
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment