From 8b4bf5f81634aa113029ac72721ebd9143c9ed80 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 May 2012 16:57:15 +0200 Subject: 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 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsfontengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp') 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 fontEngineData) : + const QSharedPointer &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(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); -- cgit v1.2.3