From c7762f117819738a426dd091246a48befdcbef08 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 3 Feb 2017 09:19:38 +0100 Subject: [PATCH] Windows: Restrict synthesizing of bold to < 750 weight When a black font is used, such as Arial Black, it would cause the font to appear to be rendered twice, particularly at large point sizes. This is down to the synthesizing of the bold aspect, however since the font is actually weighted as black this is not required. Change-Id: Ie32e0da8bc67c94123631253854312ed5c25ad9f Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../fontdatabases/windows/qwindowsfontengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp index 0cd473e020..08ebbc3be0 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp @@ -908,7 +908,7 @@ int QWindowsFontEngine::synthesized() const synthesized_flags = SynthesizedItalic; if (fontDef.stretch != 100 && ttf) synthesized_flags |= SynthesizedStretch; - if (tm.tmWeight >= 500 && !(macStyle & 1)) + if (tm.tmWeight >= 500 && tm.tmWeight < 750 && !(macStyle & 1)) synthesized_flags |= SynthesizedBold; //qDebug() << "font is" << _name << // "it=" << (macStyle & 2) << fontDef.style << "flags=" << synthesized_flags;