From 8b4e40f5354ef81c40d8da35e0e79b2a87278e31 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Thu, 22 Sep 2011 14:23:29 +0200 Subject: Support adding application fonts with QFontconfigDatabase QFontDatabaseQPA should be able to reinitialize database and reregister all the fonts when an application font is added, because it will trigger db->invalidate(). Add cloneWithSize support to QFontEngineBox so that even no usable font is found in QFontDatabase, QRawFont::setPixelSize can still work (without making the result rawfont invalid). Register application fonts with QFontconfigDatabase, the code is adapted from QFontDatabaseX11. Reenable QRawFont tests for QPA, these usages are now supported in QPA. Fix QStaticText tests, raster in QPA does support transformations. Translate the text before ZAxix rotation so that it will be visible in canvas. Add back fixedPitch support to QPA, and fix QFontDatabase tests. Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap locking. Fix QFontMetrics tests. Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977, QTBUG-20976, QTBUG-20760, QTBUG-20759 Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b Reviewed-on: http://codereview.qt-project.org/5384 Reviewed-by: Qt Sanity Bot Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 7da4e07161..b96ae6f3da 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -348,8 +348,6 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, const QFont::Weight weight = weightFromInteger(tm->tmWeight); const QFont::Stretch stretch = QFont::Unstretched; - Q_UNUSED(fixed) - if (QWindowsContext::verboseFonts > 2) { QDebug nospace = qDebug().nospace(); nospace << __FUNCTION__ << familyName << scriptName @@ -394,17 +392,17 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, } QPlatformFontDatabase::registerFont(familyName, foundryName, weight, - style, stretch, antialias, scalable, size, writingSystems, 0); + 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, - style, stretch, antialias, scalable, size, writingSystems, 0); + style, stretch, antialias, scalable, size, fixed, writingSystems, 0); if (style != QFont::StyleItalic) QPlatformFontDatabase::registerFont(familyName, foundryName, weight, - QFont::StyleItalic, stretch, antialias, scalable, size, writingSystems, 0); + QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0); if (weight <= QFont::DemiBold && style != QFont::StyleItalic) QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold, - QFont::StyleItalic, stretch, antialias, scalable, size, writingSystems, 0); + QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0); return true; } -- cgit v1.2.3