Subject: bug#77171: 31.0.50; Some lines in etc/HELLO display with large height on MS-Windows

From: Eli Zaretskii <[email-masked]>
Date: Thu, 03 Apr 2025 08:32:43 +0300

> Date: Tue, 1 Apr 2025 10:47:11 +0200
> From: Cecilio Pardo <[email-masked]>
> 
> On 22/03/2025 11:36, Eli Zaretskii wrote:
> 
> > Cecilio, could you please look into this?  I'm guessing that the code
> > we now use to return the metrics of character glyphs somehow returns
> > different results from what was used before, in this particular
> > aspect. 
> 
> The attached patch fixes this by using the GDI measurement for the 
> vertical size of text.
> 
> Doing the same with DirectWrite would be too expensive, and would imply 
> using the "layout" parts of DirectWrite, to get the same results most of 
> the time.

Hmm... are we sure the GDI measurement will work always for the fonts
for which we must use DirectWrite?  For example, the color fonts?

If GDI might fail for some fonts, perhaps leaving the metrics code in
w32_dwrite_text_extents, and then _overriding_ that by GDI values if
available, would be safer?

Thanks.