summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-03-16 00:18:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-03-18 20:24:34 +0000
commitaa543be363ffecf4d8ba9db4b26f0b6e0312b662 (patch)
tree8141adb2f430a28bb9bac10e06122b5a6c3b2307
parent6bdf83c91be8a8959ff426c509927d4e0ad40bdd (diff)
fdo#52540, fdo#88051: fix Graphite layout
The previous fixes were incomplete solutions (see the new test cases of the bug reports). Change-Id: I928f09d94edf68d268de9046c16582e6f016d561 Reviewed-on: https://gerrit.libreoffice.org/14880 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index f77ca7aee34f..095f439a770b 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -590,9 +590,12 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
static com::sun::star::uno::Reference< com::sun::star::i18n::XCharacterClassification > xCharClass;
if ( !xCharClass.is() )
xCharClass = vcl::unohelper::CreateCharacterClassification();
- size_t numchars2 = rArgs.mnEndCharPos - mnSegCharOffset; // fdo#52540, fdo#68313, fdo#70666 avoid bad ligature replacement
- if (numchars > numchars2 && (rArgs.mpStr[numchars2] == '\t' || xCharClass->getType(rArgs.mpStr, numchars2 + 1) == ::com::sun::star::i18n::UnicodeType::LOWERCASE_LETTER))
+ size_t numchars2 = rArgs.mnEndCharPos - mnSegCharOffset; // fdo#52540, fdo#68313, fdo#70666 avoid bad ligature replacement, fdo#88051 layout problem
+ if (numchars > numchars2 && (rArgs.mpStr[mnSegCharOffset + numchars2] == '\t' ||
+ xCharClass->getType(rArgs.mpStr + mnSegCharOffset, numchars2 + 1) == ::com::sun::star::i18n::UnicodeType::LOWERCASE_LETTER))
+ {
numchars = numchars2;
+ }
if (mpFeatures)
pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16,
rArgs.mpStr + mnSegCharOffset, numchars, bRtl);