diff --git a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc index 63f6954815c..e488a5c665a 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc @@ -462,13 +462,14 @@ void Paragraph::Layout(double width, bool force) { } } } + + SkPaint::FontMetrics metrics; + paint.getFontMetrics(&metrics); + paint_records.emplace_back(run.style, SkPoint::Make(run_x_offset, 0), + builder.make(), metrics, line_number, + layout.getAdvance()); } - SkPaint::FontMetrics metrics; - paint.getFontMetrics(&metrics); - paint_records.emplace_back(run.style, SkPoint::Make(run_x_offset, 0), - builder.make(), metrics, line_number, - layout.getAdvance()); run_x_offset += layout.getAdvance(); }