summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-03-16 00:18:51 +0100
committerLászló Németh <laszlo.nemeth@collabora.com>2015-03-16 00:41:29 +0100
commite2981019cb7ec3befa79a7544cee3d402f458dbf (patch)
treeb6f679af41748365c66c0d7b6cca39b6839c7b2d
parente30319e07e1b842dca749894de5b8d2f1bb7c8fd (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
-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 cb481c54dcdb..63194fcd1150 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);