Compile when -directwrite is passed to configure
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 3 Jul 2012 08:47:07 +0000 (10:47 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 3 Jul 2012 12:39:50 +0000 (14:39 +0200)
The signature for alphaRGBMapForGlyph() was updated in the
header but not the implementation. The include with
QT_BUILD_GUI_LIB defined would re-export several symbols in
QtGui from the plugin which would make the link against QtGui
fail.

Change-Id: I23c67f97ca68f984b7a1603059c6f177fef60cca
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h

index 80f91ea..e90c6b6 100644 (file)
@@ -614,11 +614,14 @@ QImage QWindowsFontEngineDirectWrite::imageForGlyph(glyph_t t,
 }
 
 QImage QWindowsFontEngineDirectWrite::alphaRGBMapForGlyph(glyph_t t,
-                                                   QFixed subPixelPosition,
-                                                   int margin,
-                                                   const QTransform &xform)
+                                                          QFixed subPixelPosition,
+                                                          const QTransform &xform)
 {
-    QImage mask = imageForGlyph(t, subPixelPosition, margin, xform);
+    QImage mask = imageForGlyph(t,
+                                subPixelPosition,
+                                glyphMargin(QFontEngineGlyphCache::Raster_RGBMask),
+                                xform);
+
     return mask.depth() == 32
            ? mask
            : mask.convertToFormat(QImage::Format_RGB32);
index 0af52a2..54594f2 100644 (file)
 
 #ifndef QT_NO_DIRECTWRITE
 
-// Enable access to HB_Face in harfbuzz includes included by qfontengine_p.h.
-#define QT_BUILD_GUI_LIB
 #include <QtGui/private/qfontengine_p.h>
-#undef QT_BUILD_GUI_LIB
-
 #include <QtCore/QSharedPointer>
 
 class QWindowsFontEngineData;