summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qplatformfontdatabase.cpp
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2020-08-05 10:47:33 +0200
committerJonas Karlsson <jonas.karlsson@qt.io>2020-08-28 07:26:54 +0200
commit3558704ed5c3d2c6dc6d024dfa454997469ca75f (patch)
tree84fe1b1d8314a389b480b7e720574573c3bd2083 /src/gui/text/qplatformfontdatabase.cpp
parenteb98bed4e76bb0fa6bad8474f2f370334cb70f6c (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/qplatformfontdatabase.cpp')
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index e101f8b3e5..d54bda4941 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -603,35 +603,6 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
}
/*!
- Helper function that returns the Qt font weight matching
- a given opentype integer value. Converts the integer
- \a weight (0 ~ 1000) to QFont::Weight and returns it.
-
- \since 5.5
-*/
-
-QFont::Weight QPlatformFontDatabase::weightFromInteger(int weight)
-{
- if (weight < 150)
- return QFont::Thin;
- if (weight < 250)
- return QFont::ExtraLight;
- if (weight < 350)
- return QFont::Light;
- if (weight < 450)
- return QFont::Normal;
- if (weight < 550)
- return QFont::Medium;
- if (weight < 650)
- return QFont::DemiBold;
- if (weight < 750)
- return QFont::Bold;
- if (weight < 850)
- return QFont::ExtraBold;
- return QFont::Black;
-}
-
-/*!
Helper function that register the \a alias for the \a familyName.
\since 5.2