summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qplatformfontdatabase.cpp
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 12:22:19 +0100
commit133bbf6ea9b9e6dff82361bf2101a35d42f0fbe0 (patch)
tree082bcef3192f7b69230295e4b9cfba53b356e148 /src/gui/text/qplatformfontdatabase.cpp
parent22929c5dfc98901a86a231a84dde90b19b94f8e5 (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> (cherry picked from commit fa7661d8b25fa338649a301010e1b5a2b63da731)
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.cpp')
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index 6fd145d921..972e0b1a09 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -47,7 +47,8 @@
QT_BEGIN_NAMESPACE
-extern void qt_registerFont(const QString &familyname, const QString &foundryname, int weight,
+extern void qt_registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, int weight,
QFont::Style style, int stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *hanlde);
@@ -89,7 +90,7 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *
}
}
QFont::Stretch stretch = QFont::Unstretched;
- registerFont(fontName,QString(),fontWeight,fontStyle,stretch,true,false,pixelSize,false,writingSystems,handle);
+ registerFont(fontName,QString(),QString(),fontWeight,fontStyle,stretch,true,false,pixelSize,false,writingSystems,handle);
}
} else {
qDebug() << "header verification of QPF2 font failed. maybe it is corrupt?";
@@ -117,7 +118,8 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *
\sa registerQPF2Font()
*/
-void QPlatformFontDatabase::registerFont(const QString &familyname, const QString &foundryname, QFont::Weight weight,
+void QPlatformFontDatabase::registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, QFont::Weight weight,
QFont::Style style, QFont::Stretch stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *usrPtr)
@@ -125,7 +127,7 @@ void QPlatformFontDatabase::registerFont(const QString &familyname, const QStrin
if (scalable)
pixelSize = 0;
- qt_registerFont(familyname, foundryname, weight, style,
+ qt_registerFont(familyname, stylename, foundryname, weight, style,
stretch, antialiased, scalable, pixelSize,
fixedPitch, writingSystems, usrPtr);
}