win32u: Only cache font glyph metrics from GGO_METRICS.

Fonts loaded with GGO_BITMAP may report different font metrics than that with GGO_METRICS. If the
font metrics from GGO_BITMAP are used and later getting font metrics with GGO_METRICS or vice versa,
the font metric difference may cause UI glitchs.

Fix Steam installer next button text moving to the left for 1 pixel when hovered on Mac and Wine is
built with FreeType > 2.8.0.
This commit is contained in:
Zhiyi Zhang 2022-08-15 23:13:54 +08:00 committed by Alexandre Julliard
parent f9739a5963
commit bca9df8db2

View file

@ -3393,7 +3393,7 @@ static DWORD get_glyph_outline( struct gdi_font *font, UINT glyph, UINT format,
ret = font_funcs->get_glyph_outline( font, index, format, &gm, &abc, buflen, buf, mat, tategaki );
if (ret == GDI_ERROR) return ret;
if ((format == GGO_METRICS || format == GGO_BITMAP || format == WINE_GGO_GRAY16_BITMAP) && !mat)
if (format == GGO_METRICS && !mat)
set_gdi_font_glyph_metrics( font, index, &gm, &abc );
done: