diff options
author | Jonas Karlsson <jonas.karlsson@qt.io> | 2020-08-05 10:47:33 +0200 |
---|---|---|
committer | Jonas Karlsson <jonas.karlsson@qt.io> | 2020-08-28 07:26:54 +0200 |
commit | 3558704ed5c3d2c6dc6d024dfa454997469ca75f (patch) | |
tree | 84fe1b1d8314a389b480b7e720574573c3bd2083 /src/gui/text/qfontdatabase.cpp | |
parent | eb98bed4e76bb0fa6bad8474f2f370334cb70f6c (diff) |
Use OpenType font weights
Task-number: QTBUG-42248
Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 550215ee64..1afaedaa09 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -888,7 +888,7 @@ static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &st break; } - int d = qAbs( styleKey.weight - style->key.weight ); + int d = qAbs( (int(styleKey.weight) - int(style->key.weight)) / 10 ); if ( styleKey.stretch != 0 && style->key.stretch != 0 ) { d += qAbs( styleKey.stretch - style->key.stretch ); |