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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 22 May 2015 18:39:16 +0300

> From: Oleh Krehel <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 22 May 2015 17:03:29 +0200
> 
>     ;; equivalent:
>     (format "%c" #x01d779)
>     (format "%c" 120697)
> 
>     ;; what gets passed to x_produce_glyphs:
>     (format "%c" 120755)
> 
> So now, if I put this check at the end of x_produce_glyphs:
> 
>     if (it->char_to_display == 120755)
>     {
>       it->max_ascent = 0;
>       it->max_descent = 0;
>     }
> 
> The problem is solved for this one char. So now the question is how
> 120697 got translated into 120755?

I can't reproduce this: I only see 120697.

I'd suggest to put a by-location watchpoint on it->char_to_display,
conditioned on the value being greater than 120000, and see which code
sets it to 120755.

> Also, for some reason I can't evaluate this in gdb:
> 
>    p get_char_glyph_code (it->char_to_display, font, &char2b)
> 
> It says that get_char_glyph_code isn't defined.

Is your build optimized, per chance?  It works for me, FWIW.

> In any case, for this character it returns FONT_INVALID_CODE.

Not sure how this is relevant; and it should return either 'true' or
'false'.

Anyway, on my system, this character enlarges the it->max_ascent value
by 1 pixel, and leaves the it->max_descent value unchanged.  The font
used to display it is Code2001, and the default font is Courier New.