summaryrefslogtreecommitdiff
path: root/vcl/source/glyphs/graphite_layout.cxx
diff options
context:
space:
mode:
authorMartin Hosken <martin_hosken@sil.org>2016-02-11 14:05:55 +0700
committerMartin Hosken <martin_hosken@sil.org>2016-02-13 02:32:25 +0000
commitf2df80410b34faa88740f2c0c2b021c74a19d5ca (patch)
treea762193f960e0409354be2225e3140bd6f4b5a64 /vcl/source/glyphs/graphite_layout.cxx
parentcf91483690291272f48ff95c1aebd165da8ae4f0 (diff)
Fix graphite line final diacritics
Change-Id: If5175fd489e835dbf9d37a45fd266c6ce44eae1a Reviewed-on: https://gerrit.libreoffice.org/22280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Martin Hosken <martin_hosken@sil.org>
Diffstat (limited to 'vcl/source/glyphs/graphite_layout.cxx')
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 2405967e6d53..2038a243394a 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -676,12 +676,16 @@ unsigned int GraphiteLayout::ScanFwdForChar(int &findChar, bool fallback) const
for (++findChar; findChar - mnMinCharPos < int(mvChar2Glyph.size()); ++findChar)
if ((res = mvChar2Glyph[findChar - mnMinCharPos]) != -1)
return res;
+ --findChar;
+ return mvGlyphs.size() - 1;
}
else
{
for (--findChar; findChar >= mnMinCharPos; --findChar)
if ((res = mvChar2Glyph[findChar - mnMinCharPos]) != -1)
return res;
+ ++findChar;
+ return 0;
}
fallback = !fallback;
}
@@ -693,8 +697,8 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
bool bRtl(mnLayoutFlags & SalLayoutFlags::BiDiRtl);
int startChar = args.mnMinCharPos < mnMinCharPos ? mnMinCharPos : args.mnMinCharPos;
int endChar = args.mnEndCharPos >= mnEndCharPos ? mnEndCharPos - 1 : args.mnEndCharPos;
- unsigned int startGi = ScanFwdForChar(startChar, !bRtl);
- unsigned int endGi = ScanFwdForChar(endChar, bRtl);
+ unsigned int startGi = ScanFwdForChar(startChar, bRtl);
+ unsigned int endGi = ScanFwdForChar(endChar, !bRtl);
int nChars = endChar - startChar + 1;
if (nChars <= 0) return;
if (startGi > endGi)