diff --git a/libs/minikin/Measurement.cpp b/libs/minikin/Measurement.cpp index 0b68ac5f64062edb7b3de62a942eff4ea7784758..a7bc64bea16b348281c2525e51ab2cc304b9aa91 100644 --- a/libs/minikin/Measurement.cpp +++ b/libs/minikin/Measurement.cpp @@ -41,7 +41,8 @@ static float getRunAdvance(Layout& layout, const uint16_t* buf, size_t layoutSta clusterWidth = charAdvance; } } - if (offset < start + count && layout.getCharAdvance(offset - layoutStart) == 0.0f) { + if (offset < start + count && layout.getCharAdvance(offset - layoutStart) == 0.0f && + !GraphemeBreak::isGraphemeBreak(buf, start, count, offset)) { // 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