From: Tarcísio Ladeia de Oliveira<wyrquill(a)gmail.com> tmAveCharWidth and font->aveWidth are apparently unrelated, so both should be checked. --- dlls/win32u/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 21a5de17b4b..10c0c2a6aa8 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -4118,7 +4118,7 @@ static void scale_outline_font_metrics( const struct gdi_font *font, OUTLINETEXT { double scale_x, scale_y; - if (font->aveWidth) + if (font->aveWidth && font->otm.otmTextMetrics.tmAveCharWidth) { scale_x = (double)font->aveWidth; scale_x /= (double)font->otm.otmTextMetrics.tmAveCharWidth; @@ -4333,7 +4333,7 @@ static void scale_font_metrics( struct gdi_font *font, TEXTMETRICW *tm ) font->aveWidth = 0; } - if (font->aveWidth) + if (font->aveWidth && font->otm.otmTextMetrics.tmAveCharWidth) { scale_x = (double)font->aveWidth; scale_x /= (double)font->otm.otmTextMetrics.tmAveCharWidth; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1192