summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2012-07-11 14:39:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 08:56:02 +0100
commitfa7661d8b25fa338649a301010e1b5a2b63da731 (patch)
treeabcc7217685ddb3175dcbf2589727448d72c9a28 /src/plugins/platforms/windows
parent3c09f6bc9aee0c97427fe8da6efdc73b4ac473aa (diff)
Fix styleName support in QPA font database
Font styleName support was disconnected since Qt switched to QPA fontdatabase. Now add the code from Qt 4.8 back to enable this in QPA. Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 262b610745..1a899c848e 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1033,17 +1033,17 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
writingSystems.setSupported(ws);
}
- QPlatformFontDatabase::registerFont(familyName, foundryName, weight,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, weight,
style, stretch, antialias, scalable, size, fixed, writingSystems, 0);
// add fonts windows can generate for us:
if (weight <= QFont::DemiBold)
- QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, QFont::Bold,
style, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(familyName, foundryName, weight,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, weight,
QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (weight <= QFont::DemiBold && style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, QFont::Bold,
QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (!englishName.isEmpty())
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index 4c3d412b8e..7d09166473 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -279,20 +279,20 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
if (!QDir::isAbsolutePath(value))
value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\"));
- QPlatformFontDatabase::registerFont(faceName, foundryName, weight, style, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
// add fonts windows can generate for us:
if (weight <= QFont::DemiBold)
- QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, style, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, QFont::Bold, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(faceName, foundryName, weight, QFont::StyleItalic, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, QFont::StyleItalic, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (weight <= QFont::DemiBold && style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, QFont::StyleItalic, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, QFont::Bold, QFont::StyleItalic, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (!englishName.isEmpty())