diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-27 12:47:02 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-29 12:45:39 +0200 |
commit | fc893070c9255637950ac9844c1ad519b0115bd8 (patch) | |
tree | 2d7d92d6a6851eab2afd572645581c5f96e160b8 | |
parent | 827b63a7a46f56b46246950fcf9f4065136880ca (diff) |
[harfbuzz] Don't change the returned positions
Use local variables instead of altering the returned glyph positions
array, looks more cleaner this way.
Change-Id: Ibbcced57777010bd045668a99d7beb0618abe226
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index 5cd1b07c14b8..abd9adffd947 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -426,20 +426,20 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) if (hb_ot_layout_get_glyph_class(maHbFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK) nGlyphFlags |= GlyphItem::IS_DIACRITIC; - aHbPositions[i].x_offset = aHbPositions[i].x_offset >> 6; - aHbPositions[i].y_offset = aHbPositions[i].y_offset >> 6; - aHbPositions[i].x_advance = aHbPositions[i].x_advance >> 6; - aHbPositions[i].y_advance = aHbPositions[i].y_advance >> 6; + int32_t nXOffset = aHbPositions[i].x_offset >> 6; + int32_t nYOffset = aHbPositions[i].y_offset >> 6; + int32_t nXAdvance = aHbPositions[i].x_advance >> 6; + int32_t nYAdvance = aHbPositions[i].y_advance >> 6; - Point aNewPos = Point(aCurrPos.X() + aHbPositions[i].x_offset, -(aCurrPos.Y() + aHbPositions[i].y_offset)); + Point aNewPos = Point(aCurrPos.X() + nXOffset, -(aCurrPos.Y() + nYOffset)); GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth); - aGI.mnNewWidth = aHbPositions[i].x_advance; + aGI.mnNewWidth = nXAdvance; rLayout.AppendGlyph(aGI); - aCurrPos.X() += aHbPositions[i].x_advance; - aCurrPos.Y() += aHbPositions[i].y_advance; + aCurrPos.X() += nXAdvance; + aCurrPos.Y() += nYAdvance; } hb_buffer_destroy(aHbBuffer); |