diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-27 10:15:34 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-27 10:15:34 (GMT) |
commit | aac8c2678867ae86af846a2644e37b3d1436406a (patch) | |
tree | 64a5eab52fbec59c7cdf04afe5d1e76a78ce5075 /src/gui/text | |
parent | 39e6aa3f4434ab31d3d862574aa505b3f946ee9b (diff) | |
parent | b0390e68893dd04076434695be5e676b87bc067c (diff) | |
download | Qt-aac8c2678867ae86af846a2644e37b3d1436406a.zip Qt-aac8c2678867ae86af846a2644e37b3d1436406a.tar.gz Qt-aac8c2678867ae86af846a2644e37b3d1436406a.tar.bz2 |
Merge branch 'staging-master' of scm.dev.nokia.troll.no:qt/qt-lighthouse into master-integration
* 'staging-master' of scm.dev.nokia.troll.no:qt/qt-lighthouse: (69 commits)
Lighthouse: License headers to new files in testlite
Make sure we blit the fbo on flush in QGLWindowSurface
Lighthouse: Wayland. Make the wayland integration closer to Lighthosue
Lighthouse: Wayland, only make one fbo for the WaylandPaintDevice
Making clearer separation between responsibility of different classes
Make it possible to vertically mirror gl painting
Lighthouse:Wayland Moving some logic into files
Fix Wayland plugin to work with Wayland after some interfaces changed
Make QGLContext::fromPlatformGLContext show correct sharing
Remove Lighthouse specific code from QGLWindowSurface
Fix X11 clipboard bug.
Fix for uninitialized member in QWaylandCursor
wayland: use pkgconfig for libdrm in wayland.pro
wayland: remove non-public header from config.tests
wayland: fix SOURCES to point to wayland.cpp in config.tests
Wayland: request rbg and premultiplied argb visuals as needed
Wayland: clamp window resizes to screen size
Wayland: split GL code into separate files
Wayland: use correct viewport for swapBuffers and correct coords
Wayland: fix geometry of swapBuffers
...
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfont_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase_qpa.cpp | 12 | ||||
-rw-r--r-- | src/gui/text/qplatformfontdatabase_qpa.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qplatformfontdatabase_qpa.h | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/text/qfont_qpa.cpp b/src/gui/text/qfont_qpa.cpp index 5fed18b..7b09b59 100644 --- a/src/gui/text/qfont_qpa.cpp +++ b/src/gui/text/qfont_qpa.cpp @@ -90,7 +90,7 @@ QString QFont::defaultFamily() const familyName = QString::fromLatin1("helvetica"); } - QStringList list = QApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(familyName,QFont::StyleNormal,QUnicodeTables::Common); + QStringList list = QApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(familyName,QFont::StyleNormal,QFont::StyleHint(d->request.styleHint),QUnicodeTables::Common); if (list.size()) { familyName = list.at(0); } diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp index e54093c..e6d99c6 100644 --- a/src/gui/text/qfontdatabase_qpa.cpp +++ b/src/gui/text/qfontdatabase_qpa.cpp @@ -80,9 +80,9 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &fou size->handle = handle; } -static QStringList fallbackFamilies(const QString &family, const QFont::Style &style, const QUnicodeTables::Script &script) +static QStringList fallbackFamilies(const QString &family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) { - QStringList retList = QApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,script); + QStringList retList = QApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script); QFontDatabasePrivate *db = privateDb(); QStringList::iterator i; @@ -177,7 +177,11 @@ QFontEngine *loadEngine(int script, const QFontDef &request, && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol ) { if (family && !family->askedForFallback) { - family->fallbackFamilies = fallbackFamilies(family->name,QFont::Style(style->key.style),QUnicodeTables::Script(script)); + QFont::Style fontStyle = QFont::Style(style->key.style); + QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint); + if (styleHint == QFont::AnyStyle && request.fixedPitch) + styleHint = QFont::TypeWriter; + family->fallbackFamilies = fallbackFamilies(family->name,fontStyle,styleHint,QUnicodeTables::Script(script)); family->askedForFallback = true; } @@ -287,7 +291,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp, if (!engine) { if (!request.family.isEmpty()) { - QStringList fallbacks = fallbackFamilies(request.family,QFont::Style(request.style),QUnicodeTables::Script(script)); + QStringList fallbacks = fallbackFamilies(request.family,QFont::Style(request.style),QFont::StyleHint(request.styleHint),QUnicodeTables::Script(script)); for (int i = 0; i < fallbacks.size(); i++) { QFontDef def = request; def.family = fallbacks.at(i); diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp index d6dff41..afe762a 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.cpp +++ b/src/gui/text/qplatformfontdatabase_qpa.cpp @@ -221,10 +221,11 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, QUnicode /*! */ -QStringList QPlatformFontDatabase::fallbacksForFamily(const QString family, const QFont::Style &style, const QUnicodeTables::Script &script) const +QStringList QPlatformFontDatabase::fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const { Q_UNUSED(family); Q_UNUSED(style); + Q_UNUSED(styleHint); Q_UNUSED(script); return QStringList(); } diff --git a/src/gui/text/qplatformfontdatabase_qpa.h b/src/gui/text/qplatformfontdatabase_qpa.h index aa465ab..a1faea9 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.h +++ b/src/gui/text/qplatformfontdatabase_qpa.h @@ -88,7 +88,7 @@ class Q_GUI_EXPORT QPlatformFontDatabase public: virtual void populateFontDatabase(); virtual QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle); - virtual QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QUnicodeTables::Script &script) const; + virtual QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const; virtual QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName); virtual void releaseHandle(void *handle); |