summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontengine.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-14 16:57:15 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-15 14:34:04 +0200
commit8b4bf5f81634aa113029ac72721ebd9143c9ed80 (patch)
tree8eedef4172b08af5b6be651298aae1629188d167 /src/plugins/platforms/windows/qwindowsfontengine.cpp
parentc241d8921ea6384c30a1731a036aec8edc7609ab (diff)
Fix font printing on Windows using the native engine.
- Add HFONT, LOGFONT, trueType as properties of the Windows font engine, make it a real Q_OBJECT. - Query properties in the Windows print engine and use the HFONT, LOGFONT there. Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 801dba2e79..d8a18655bb 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -283,7 +283,7 @@ int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLa
QWindowsFontEngine::QWindowsFontEngine(const QString &name,
HFONT _hfont, bool stockFontIn, LOGFONT lf,
- QSharedPointer<QWindowsFontEngineData> fontEngineData) :
+ const QSharedPointer<QWindowsFontEngineData> &fontEngineData) :
m_fontEngineData(fontEngineData),
_name(name),
hfont(_hfont),
@@ -1318,7 +1318,7 @@ void QWindowsMultiFontEngine::loadEngine(int at)
const QString fam = fallbacks.at(at-1);
QWindowsFontEngine *fe = static_cast<QWindowsFontEngine*>(engines.at(0));
- LOGFONT lf = fe->logfont();
+ LOGFONT lf = fe->logFont();
memcpy(lf.lfFaceName, fam.utf16(), sizeof(wchar_t) * qMin(fam.length() + 1, 32)); // 32 = Windows hard-coded
HFONT hfont = CreateFontIndirect(&lf);