diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-04-01 06:54:45 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-04-07 13:08:02 +0000 |
commit | 037ad03182ce3c174a5a9afc6780212bb2fe8a12 (patch) | |
tree | abe01fec7d77b853efb51affdf364ebccc0d9303 /src/gui/text | |
parent | 95d034a14f78aaefd6990de180f715c8b4d510b1 (diff) |
[QFontEngineFT] Avoid double-negation of info.x
Make it consistent with fetchMetricsOnly path.
Change-Id: I6a2d2568d5579255582217515a4e598722547c60
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 0437561572..7949bbc2a4 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -949,7 +949,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, info.height = slot->bitmap.rows / vfactor; info.width = hsubpixel ? slot->bitmap.width / 3 : slot->bitmap.width; - info.x = -slot->bitmap_left; + info.x = slot->bitmap_left; info.y = slot->bitmap_top; glyph_buffer_size = info.width * info.height * 4; @@ -1014,11 +1014,11 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, hpixels = hpixels*3 + 8; info.width = hpixels; info.height = TRUNC(top - bottom); - info.x = -TRUNC(left); + info.x = TRUNC(left); info.y = TRUNC(top); if (hsubpixel) { info.width /= 3; - info.x += 1; + info.x -= 1; } bool large_glyph = (((short)(slot->linearHoriAdvance>>10) != slot->linearHoriAdvance>>10) @@ -1146,7 +1146,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, g->linearAdvance = slot->linearHoriAdvance >> 10; g->width = info.width; g->height = info.height; - g->x = -info.x; + g->x = info.x; g->y = info.y; g->advance = info.xOff; g->format = format; |