diff options
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 39 |
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 |