diff options
author | Dominik Holland <dominik.holland@qt.io> | 2022-10-04 09:07:10 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-11 18:29:27 +0000 |
commit | 2d819ee839e1fbeb724bb91b0b4434bf6711663b (patch) | |
tree | efcad09d353ce36f5831e9c889c526deaf67e9a0 /src | |
parent | 7ade61593424910a63085cef8203feb4bae4ec06 (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: Icc3c69fe0395cea9954c2fa07c39e7769fc91800
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit cba96b3a97977f71931f311db9d5644d1d74d694)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/qsgrhitextureglyphcache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgrhitextureglyphcache.cpp b/src/quick/scenegraph/qsgrhitextureglyphcache.cpp index da9db65bc8..e46a2d9556 100644 --- a/src/quick/scenegraph/qsgrhitextureglyphcache.cpp +++ b/src/quick/scenegraph/qsgrhitextureglyphcache.cpp @@ -233,7 +233,10 @@ void QSGRhiTextureGlyphCache::endFillTexture() int QSGRhiTextureGlyphCache::glyphPadding() const { - return 1; + if (m_format == QFontEngine::Format_Mono) + return 8; + else + return 1; } int QSGRhiTextureGlyphCache::maxTextureWidth() const |