From f6a5a300d59d8d8555d453f4154b494cc345d2a5 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 28 Mar 2018 14:18:37 -0700 Subject: [PATCH] libtxt: move to the next run if the current run ends before the start of the line block (flutter/engine#4891) Fixes https://github.com/flutter/flutter/issues/15975 --- engine/src/flutter/third_party/txt/src/txt/paragraph.cc | 4 ++++ 1 file changed, 4 insertions(+) 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 f9d11f457b..b2d4f7c70f 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc @@ -239,6 +239,10 @@ bool Paragraph::ComputeLineBreaks() { StyledRuns::Run run = runs_.GetRun(run_index); if (run.start >= block_end) break; + if (run.end < block_start) { + run_index++; + continue; + } minikin::FontStyle font; minikin::MinikinPaint paint;