summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-13 08:54:45 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-09-13 08:54:45 +0200
commitb62bd0584a7872b6917917009b707785b3abd077 (patch)
tree9981f274712c098cabbff0c4667672a3934e5393 /src/gui/text/qfontengine.cpp
parent5e10745dca1d10025404a9f268f03ae697fb10cc (diff)
parent97baad65f65783d2b5ff938f6217aec9434f2e5f (diff)
Merge branch 'refactor'
Conflicts: mkspecs/qws/linux-lsb-g++/qmake.conf src/gui/image/qpixmap_mac.cpp src/gui/painting/qpaintengine_x11.cpp src/gui/painting/qtessellator.cpp src/gui/text/qfontengine_qws.cpp src/gui/text/qfontengine_x11.cpp src/gui/widgets/qlinecontrol.cpp src/opengl/qgl.h src/opengl/qgl_x11egl.cpp src/plugins/plugins.pro Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 2cf0fdb040..f7f3b0e900 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -280,6 +280,8 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
int i = glyphs.numGlyphs;
int totalKashidas = 0;
while(i--) {
+ if (glyphs.attributes[i].dontPrint)
+ continue;
xpos += glyphs.advances_x[i] + QFixed::fromFixed(glyphs.justifications[i].space_18d6);
ypos += glyphs.advances_y[i];
totalKashidas += glyphs.justifications[i].nKashidas;
@@ -1680,11 +1682,42 @@ bool QFontEngineMulti::canRender(const QChar *string, int len)
return allExist;
}
-QImage QFontEngineMulti::alphaMapForGlyph(glyph_t)
+/* Implement alphaMapForGlyph() which is called by Lighthouse/Windows code.
+ * Ideally, that code should be fixed to correctly handle QFontEngineMulti. */
+
+QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph)
+{
+ const int which = highByte(glyph);
+ Q_ASSERT(which < engines.size());
+ return engine(which)->alphaMapForGlyph(stripped(glyph));
+}
+
+QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition)
{
- Q_ASSERT(false);
- return QImage();
+ const int which = highByte(glyph);
+ Q_ASSERT(which < engines.size());
+ return engine(which)->alphaMapForGlyph(stripped(glyph), subPixelPosition);
}
+QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
+{
+ const int which = highByte(glyph);
+ Q_ASSERT(which < engines.size());
+ return engine(which)->alphaMapForGlyph(stripped(glyph), t);
+}
+
+QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
+{
+ const int which = highByte(glyph);
+ Q_ASSERT(which < engines.size());
+ return engine(which)->alphaMapForGlyph(stripped(glyph), subPixelPosition, t);
+}
+
+QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, const QTransform &t)
+{
+ const int which = highByte(glyph);
+ Q_ASSERT(which < engines.size());
+ return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, margin, t);
+}
QT_END_NAMESPACE