diff options
Diffstat (limited to 'src/opengl/qopengltextureglyphcache.cpp')
-rw-r--r-- | src/opengl/qopengltextureglyphcache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/qopengltextureglyphcache.cpp b/src/opengl/qopengltextureglyphcache.cpp index 39f39c554d..0bab710b1b 100644 --- a/src/opengl/qopengltextureglyphcache.cpp +++ b/src/opengl/qopengltextureglyphcache.cpp @@ -13,7 +13,7 @@ QT_BEGIN_NAMESPACE static int next_qopengltextureglyphcache_serial_number() { - static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0); + Q_CONSTINIT static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0); return 1 + serial.fetchAndAddRelaxed(1); } @@ -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 |