From: Tarcísio Ladeia de Oliveira<wyrquill(a)gmail.com> This follows behavior observed in tests where ppem == 0. As a consequence, tmMaxCharWidth can also be 0. --- dlls/win32u/freetype.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/freetype.c b/dlls/win32u/freetype.c index 26ab8e11cf7..117dc7e0b8e 100644 --- a/dlls/win32u/freetype.c +++ b/dlls/win32u/freetype.c @@ -3757,8 +3757,9 @@ static BOOL freetype_set_outline_text_metrics( struct gdi_font *font ) (pHori->Ascender - pHori->Descender)))); TM.tmAveCharWidth = SCALE_X(pOS2->xAvgCharWidth); - if (TM.tmAveCharWidth == 0) { - TM.tmAveCharWidth = 1; + if(TM.tmAveCharWidth == 0 && TM.tmHeight != 0) + { + TM.tmAveCharWidth = 1; } TM.tmMaxCharWidth = SCALE_X(ft_face->bbox.xMax - ft_face->bbox.xMin); TM.tmWeight = FW_REGULAR; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1192