Disable hyphenation when word overlaps style boundary

am: 72ab39455f

* commit '72ab39455f2fe587116066d5ec66d75cd89f0114':
  Disable hyphenation when word overlaps style boundary
This commit is contained in:
Raph Levien
2016-02-18 19:16:02 +00:00
committed by android-build-merger

View File

@@ -174,7 +174,8 @@ float LineBreaker::addStyleRun(MinikinPaint* paint, const FontCollection* typefa
if (paint != nullptr && mHyphenator != nullptr &&
mHyphenationFrequency != kHyphenationFrequency_None &&
!wordEndsInHyphen && !temporarilySkipHyphenation &&
wordEnd > wordStart && wordEnd - wordStart <= LONGEST_HYPHENATED_WORD) {
wordStart >= start && wordEnd > wordStart &&
wordEnd - wordStart <= LONGEST_HYPHENATED_WORD) {
mHyphenator->hyphenate(&mHyphBuf, &mTextBuf[wordStart], wordEnd - wordStart);
#if VERBOSE_DEBUG
std::string hyphenatedString;