diff options
author | Liang Qi <liang.qi@qt.io> | 2019-03-31 12:39:42 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-03-31 12:39:42 +0200 |
commit | 29f01b32f58573b23bd35857376f6f92e15382a3 (patch) | |
tree | b1a044f87e4b18d5ddd779dc1b63161ded1c3d1a /src/plugins/platforms/xcb | |
parent | 300940a6c9eb0f74cefda7d76a5d19f56ec50253 (diff) | |
parent | 0a7302abbc47a0db25f119ee4f5144bbaf0d9d6f (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/configure.json
Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp | 7 |
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); |