summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2022-10-04 09:22:03 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-10-11 16:36:18 +0000
commita422fc89a3371e1236f12181f641e767e7513700 (patch)
tree130bd20f148422059a843096431dad5ea8ee98d3
parent935edbb598363e4a73477ce8479b66e99a6cfd5a (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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/opengl/qopengltextureglyphcache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qopengltextureglyphcache.cpp b/src/opengl/qopengltextureglyphcache.cpp
index 6c8971fddb..085a814601 100644
--- a/src/opengl/qopengltextureglyphcache.cpp
+++ b/src/opengl/qopengltextureglyphcache.cpp
@@ -443,7 +443,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