diff --git a/libs/minikin/Layout.cpp b/libs/minikin/Layout.cpp index 3935eb761c52c1b61b4e33f42f003c1b403ef38b..aba8a1c7abe81ceca7c9283d8442f7ce799861f0 100644 --- a/libs/minikin/Layout.cpp +++ b/libs/minikin/Layout.cpp @@ -661,7 +661,7 @@ void Layout::doLayoutRun(const uint16_t* buf, size_t start, size_t count, size_t ctx->paint.font->GetBounds(&glyphBounds, glyph_ix, ctx->paint); glyphBounds.offset(x + xoff, y + yoff); mBounds.join(glyphBounds); - size_t cluster = info[i].cluster; + size_t cluster = info[i].cluster - start; mAdvances[cluster] += xAdvance; x += xAdvance; }