diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-30 00:36:07 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-30 00:41:41 +0200 |
commit | 7b4d921d8e4164a962cd10a2efc9c62ecf64ff17 (patch) | |
tree | f8c08acd49bb281bcd6107e80026d766026ebca7 | |
parent | b4cf309bab18caafdd2e12d21053f412a40b764d (diff) |
tdf#103401: Fix applying DX array with font fallback
Turns out if we don’t adjust the glyph width (not only its X position)
we will apply the DX adjustment more than once when there is font
fallback.
Change-Id: I5e72e5d211adf3b378ec23c0cabe38fd0d5c9b19
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 91d776205e73..c19eeed2b6f6 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -673,7 +673,10 @@ void CommonSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs) if (bKashidaJustify && nDiff > 1) pKashidas[i] = nDiff; - // Apply the same delta to all glyphs belonging to the same character. + // Adjust the width of the first glyph belonging to current character. + m_GlyphItems[i].mnNewWidth += nDiff; + + // Apply the X position of all glyphs belonging to current character. size_t j = i; while (j < m_GlyphItems.size()) { |