Subject: Re: bug#20628: 25.0.50; Incorrect line height for some fonts

From: Eli Zaretskii <[email-masked]>
Date: Fri, 22 May 2015 17:07:56 +0300

> From: Oleh Krehel <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 22 May 2015 15:54:21 +0200
> 
> I'm looking at xdisp.c now. When I set this:
> 
>     it->max_ascent = 0;
>     it->max_descent = 0;
> 
> the problem disappears.

Of course, it does: you've just made Emacs ignore characters which
have non-zero ascent and descent.

> Of course, it causes a problem in places where ascent and descent
> are actually used, like for displaying images.

More importantly, it will display characters with ascent or descent
incorrectly clipped.

> I just need to figure out how it->max_ascent gets computed from
> glyph->descent.

Like this:

  it->max_ascent = max (it->max_ascent, it->ascent);
  it->max_descent = max (it->max_descent, it->descent);

IOW, it's the max value of ascent and descent of all the characters on
that screen line.