diff --git a/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp b/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp index aacfc4d374..6475cb2ebc 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp @@ -1078,7 +1078,7 @@ void Layout::doLayoutRun(const uint16_t* buf, xoff += yoff * ctx->paint.skewX; LayoutGlyph glyph = { font_ix, glyph_ix, x + xoff, y + yoff, - static_cast(info[i].cluster - clusterOffset)}; + static_cast(info[i].cluster - clusterOffset)}; mGlyphs.push_back(glyph); float xAdvance = HBFixedToFloat(positions[i].x_advance); if ((ctx->paint.paintFlags & LinearTextFlag) == 0) { @@ -1140,7 +1140,7 @@ void Layout::appendLayout(Layout* src, size_t start, float extraAdvance) { float x = x0 + srcGlyph.x; float y = srcGlyph.y; LayoutGlyph glyph = {font_ix, glyph_id, x, y, - static_cast(srcGlyph.cluster + start)}; + static_cast(srcGlyph.cluster + start)}; mGlyphs.push_back(glyph); } for (size_t i = 0; i < src->mAdvances.size(); i++) { diff --git a/engine/src/flutter/third_party/txt/src/minikin/Layout.h b/engine/src/flutter/third_party/txt/src/minikin/Layout.h index fe06e73ad6..78cf7644ba 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/Layout.h +++ b/engine/src/flutter/third_party/txt/src/minikin/Layout.h @@ -40,7 +40,7 @@ struct LayoutGlyph { // libtxt extension: record the cluster (character index) that corresponds // to this glyph - ssize_t cluster; + uint32_t cluster; }; // Internal state used during layout operation