diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-27 12:02:10 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-29 12:45:38 +0200 |
commit | 827b63a7a46f56b46246950fcf9f4065136880ca (patch) | |
tree | 1c5fa44dee73d4bfba8d35b3854f29d075f3a7e8 /vcl | |
parent | d225318ead0154681982656bcd3e98011e022c34 (diff) |
[harfbuzz] Correctly apply glyph positions
X and Y offsets should only affect the position of the current glyph,
not any subsequent ones.
Change-Id: I9dd1576cbdbb36b70f1898dc52702c02c4e851af
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index eef1fd08f201..5cd1b07c14b8 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -338,7 +338,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) rLayout.Reserve(nGlyphCapacity); - Point aNewPos(0, 0); + Point aCurrPos(0, 0); while (true) { int nMinRunPos, nEndRunPos; @@ -431,15 +431,15 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) aHbPositions[i].x_advance = aHbPositions[i].x_advance >> 6; aHbPositions[i].y_advance = aHbPositions[i].y_advance >> 6; - aNewPos = Point(aNewPos.X() + aHbPositions[i].x_offset, aNewPos.Y() - aHbPositions[i].y_offset); + Point aNewPos = Point(aCurrPos.X() + aHbPositions[i].x_offset, -(aCurrPos.Y() + aHbPositions[i].y_offset)); GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth); aGI.mnNewWidth = aHbPositions[i].x_advance; rLayout.AppendGlyph(aGI); - aNewPos.X() += aHbPositions[i].x_advance; - aNewPos.Y() += aHbPositions[i].y_advance; + aCurrPos.X() += aHbPositions[i].x_advance; + aCurrPos.Y() += aHbPositions[i].y_advance; } hb_buffer_destroy(aHbBuffer); |