Disable hyphenation when word overlaps style boundary am: 72ab39455f

am: b708833cf3

* commit 'b708833cf3562f7169a8ef6c22b4a194af5d1b07':
  Disable hyphenation when word overlaps style boundary
This commit is contained in:
Raph Levien
2016-02-18 19:51:41 +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;