diff options
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index bd3883a..a904064 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -4791,22 +4791,6 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti, } QImage glyph_im(ti.fontEngine->alphaMapForGlyph(glyphs[i])); - - // The QPF implementation of alphaMapForGlyph() uses the color - // RGBA = (value, value, value, 255) instead of the color - // RGBA = (0, 0, 0, value) that the other font engines use. - // We modify the image colors to rectify this situation. - QFontEngine::Type type = ti.fontEngine->type(); - if (type == QFontEngine::QPF1 || type == QFontEngine::QPF2) { - if (glyph_im.format() == QImage::Format_Indexed8) { - for (int i = 0; i < 256; ++i) - glyph_im.setColor(i, qRgba(0, 0, 0, i)); - } else if (glyph_im.format() == QImage::Format_Mono) { - glyph_im.setColor(0, qRgba(0, 0, 0, 0)); - glyph_im.setColor(1, qRgba(0, 0, 0, 255)); - } - } - glyph_im = glyph_im.convertToFormat(QImage::Format_Indexed8); glyph_width = glyph_im.width(); Q_ASSERT(glyph_width >= 0); |