diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-09-04 15:30:41 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 09:48:22 +0200 |
commit | 0cf79e47dacb6439b378aca71d90ce4bbb45795b (patch) | |
tree | e45a4c045da362b700af168ae02858257412996e /src/plugins | |
parent | 35bc3dc45aacaf36a8bdfccc7627136cc2e5b185 (diff) |
Remove undesired pixel padding of glyphs on windows.
The excessive padding has serious performance implications throughout
Qt and need to go. The original reason for having them was to fix
issues with GL text rendering and issues with unspecified OpenType
fonts. There have been several other changes to the glyph cache
since then and neither of the issues can be reproduced today.
Change-Id: I6de67598a079c296daf48be07cc5c2d67768c384
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontengine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 6b5304120b..3df199bf13 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -1135,8 +1135,8 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph, #endif // wince // The padding here needs to be kept in sync with the values in alphaMapBoundingBox. - QWindowsNativeImage *ni = new QWindowsNativeImage(iw + 2 * margin + 4, - ih + 2 * margin + 4, + QWindowsNativeImage *ni = new QWindowsNativeImage(iw + 2 * margin, + ih + 2 * margin, QWindowsNativeImage::systemFormat()); /*If cleartype is enabled we use the standard system format even on Windows CE @@ -1175,8 +1175,8 @@ glyph_metrics_t QWindowsFontEngine::alphaMapBoundingBox(glyph_t glyph, QFixed po if (format == QFontEngine::Format_A32 || format == QFontEngine::Format_ARGB) margin = glyphMargin(QFontEngineGlyphCache::Raster_RGBMask); glyph_metrics_t gm = boundingBox(glyph, matrix); - gm.width += margin * 2 + 4; - gm.height += margin * 2 + 4; + gm.width += margin * 2; + gm.height += margin * 2; return gm; } |