summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2022-10-04 09:22:03 +0200
committerDominik Holland <dominik.holland@qt.io>2022-10-12 14:45:27 +0200
commitbb641f017f0716559aede13048111787fa5098d0 (patch)
tree550c4ee5a66d3343d58e45e8b68bdc71efaa9c5b /src/opengl
parent7c332e4cd9067bb2c2d8168c25a6a5ee09dc760c (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 Change-Id: Icf69150b6b446099ad05d706ddcab0a57f8fe0c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit f6626cf3c3e7336567293b4b943a97b76e4e5f3d)
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 9797fe2cfb..35e15919af 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -374,7 +374,10 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
int QGLTextureGlyphCache::glyphPadding() const
{
- return 1;
+ if (m_format == QFontEngine::Format_Mono)
+ return 8;
+ else
+ return 1;
}
int QGLTextureGlyphCache::maxTextureWidth() const