diff options
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index a258b72708..9d42d8ab69 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1681,11 +1681,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) +{ + 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) { - Q_ASSERT(false); - return QImage(); + 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 |