Revert "Allow clusters to start with zero-width characters"

This reverts commit 1b3bfb2624.

Bug: 22589743
Bug: 22121742
Change-Id: I7b482ffb8a0ee174ddc804aa890de45bdbd758e3
This commit is contained in:
Raph Levien
2015-07-21 05:31:11 +00:00
committed by Roozbeh Pournader
parent 1b3bfb2624
commit 4d86b85e69

View File

@@ -41,8 +41,7 @@ static float getRunAdvance(Layout& layout, const uint16_t* buf, size_t layoutSta
clusterWidth = charAdvance;
}
}
if (offset < start + count && layout.getCharAdvance(offset - layoutStart) == 0.0f &&
!GraphemeBreak::isGraphemeBreak(buf, start, count, offset)) {
if (offset < start + count && layout.getCharAdvance(offset - layoutStart) == 0.0f) {
// In the middle of a cluster, distribute width of cluster so that each grapheme cluster
// gets an equal share.
// TODO: get caret information out of font when that's available