Zhiyi Zhang : win32u: Only cache font glyph metrics from GGO_METRICS.
Module: wine Branch: master Commit: bca9df8db26206ddd9c615d274d8ff0c5652e17a URL: https://gitlab.winehq.org/wine/wine/-/commit/bca9df8db26206ddd9c615d274d8ff0... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Aug 15 23:13:54 2022 +0800 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. --- dlls/win32u/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index e281db9b0c8..7fc4a01eb64 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -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:
participants (1)
-
Alexandre Julliard