From ee273cef41375c473b63d2e75f4545d07a8ece12 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 7 Aug 2018 13:56:34 -0700 Subject: [PATCH] libtxt: truncate paragraph width to an integer in order to match Blink's behavior (flutter/engine#5962) See https://github.com/flutter/flutter/issues/18665 --- engine/src/flutter/third_party/txt/src/txt/paragraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a376470f9a..f0b733df58 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc @@ -417,7 +417,7 @@ void Paragraph::Layout(double width, bool force) { } needs_layout_ = false; - width_ = width; + width_ = floor(width); if (!ComputeLineBreaks()) return;