summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/nativepainting
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/nativepainting')
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
index 3377eeaae9..8d958aae94 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
@@ -2645,6 +2645,13 @@ bool QXRenderGlyphCache::addGlyphs(const QTextItemInt &ti,
if (glyph == 0 || glyph->format != glyphFormat())
return false;
+ if (glyph->format == QFontEngine::Format_Mono) {
+ // Must convert bitmap from msb to lsb bit order
+ QImage img(glyph->data, glyph->width, glyph->height, QImage::Format_Mono);
+ img = img.convertToFormat(QImage::Format_MonoLSB);
+ memcpy(glyph->data, img.constBits(), static_cast<size_t>(img.sizeInBytes()));
+ }
+
set->setGlyph(glyphs[i], spp, glyph);
Q_ASSERT(glyph->data || glyph->width == 0 || glyph->height == 0);