summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2020-06-22 12:12:45 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2020-06-22 13:41:20 +0200
commitf5c132ef28da5afb92d141e683b2910b4480f0ed (patch)
treefdfb9719db7ca8d330b5a550ee92e44b556c0f6c /src
parentb862788e62ba324d574c676919591187dccb6709 (diff)
Avoid Freetype synthesizing for large font sizes
Freetype's fake emboldening does not give good results for large font sizes. Pick-to: 5.15 Fixes: QTBUG-84570 Change-Id: I1a7722c1482e3450e5a549c31c9766d930fcd13a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/freetype/qfontengine_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/freetype/qfontengine_ft.cpp b/src/gui/text/freetype/qfontengine_ft.cpp
index e50cfe584e..e916d7242f 100644
--- a/src/gui/text/freetype/qfontengine_ft.cpp
+++ b/src/gui/text/freetype/qfontengine_ft.cpp
@@ -750,7 +750,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
// fake bold
if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) {
if (const TT_OS2 *os2 = reinterpret_cast<const TT_OS2 *>(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) {
- if (os2->usWeightClass < 700)
+ if (os2->usWeightClass < 700 && fontDef.pixelSize < 64)
embolden = true;
}
}