diff options
author | Dominik Holland <dominik.holland@qt.io> | 2022-10-04 09:22:03 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2022-10-11 18:35:59 +0200 |
commit | f6626cf3c3e7336567293b4b943a97b76e4e5f3d (patch) | |
tree | 7c9e00ad8b931bc4d33bed7609959d01f3daf827 | |
parent | c4e550703c2bdc1ee710507b8df9c0c9a118402e (diff) |
Fix broken Text rendering when noantialiased NativeRendering is used
In case antialiasing is disabled the QFontEngine::Format_Mono is used
to render in the glyph cache.
In this format the padding needs to be 8-bit aligned.
Fixes: QTBUG-107038
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Icf69150b6b446099ad05d706ddcab0a57f8fe0c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/opengl/qopengltextureglyphcache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qopengltextureglyphcache.cpp b/src/opengl/qopengltextureglyphcache.cpp index b11f4d3b1b..0bab710b1b 100644 --- a/src/opengl/qopengltextureglyphcache.cpp +++ b/src/opengl/qopengltextureglyphcache.cpp @@ -407,7 +407,10 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, int QOpenGLTextureGlyphCache::glyphPadding() const { - return 1; + if (m_format == QFontEngine::Format_Mono) + return 8; + else + return 1; } int QOpenGLTextureGlyphCache::maxTextureWidth() const |