From ea7bb0d5fde67ac05d31d08b22b89c9d4bd98c8d 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 (#4891) Fixes https://github.com/flutter/flutter/issues/15975 --- third_party/txt/src/txt/paragraph.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/txt/src/txt/paragraph.cc b/third_party/txt/src/txt/paragraph.cc index f9d11f457..b2d4f7c70 100644 --- a/third_party/txt/src/txt/paragraph.cc +++ b/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; -- GitLab