summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2017-02-03 09:19:38 +0100
committerAndy Shaw <andy.shaw@qt.io>2017-02-03 11:07:42 +0000
commitc7762f117819738a426dd091246a48befdcbef08 (patch)
tree188c102bbaf518279eca33ec2d407aebcd8965ff /src/platformsupport
parent8286399b9e1988b18810d762c4665658bb7428f9 (diff)
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 <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp2
1 files changed, 1 insertions, 1 deletions
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;