summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtextureglyphcache.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-18 13:25:43 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-18 13:25:43 (GMT)
commit86edc526684d80e405bcd1c63b5a314b70408679 (patch)
treedfe6a3e989d4468d852019d00f062c4b8d48d036 /src/gui/painting/qtextureglyphcache.cpp
parent5c42e4328cc2bea53dc4d31eb3f4d10d42ac6ee1 (diff)
parent7e4d4474d10cb17047d95e3a4820388468c74507 (diff)
downloadQt-86edc526684d80e405bcd1c63b5a314b70408679.zip
Qt-86edc526684d80e405bcd1c63b5a314b70408679.tar.gz
Qt-86edc526684d80e405bcd1c63b5a314b70408679.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 1ea40ba..3fd1ffb 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -88,11 +88,12 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti,
ti.ascent.toReal(),
ti.descent.toReal());
#endif
- int glyph_width = metrics.width.ceil().toInt() + margin * 2;
- int glyph_height = metrics.height.ceil().toInt() + margin * 2;
+ int glyph_width = metrics.width.ceil().toInt();
+ int glyph_height = metrics.height.ceil().toInt();
if (glyph_height == 0 || glyph_width == 0)
continue;
-
+ glyph_width += margin * 2 + 2;
+ glyph_height += margin * 2 + 2;
// align to 8-bit boundary
if (m_type == QFontEngineGlyphCache::Raster_Mono)
glyph_width = (glyph_width+7)&~7;
@@ -188,11 +189,7 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
int QImageTextureGlyphCache::glyphMargin() const
{
-#ifdef Q_WS_MAC
return 2;
-#else
- return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0;
-#endif
}
void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g)