From 2e11a27f659f98efe8906981eab644d74c8891aa Mon Sep 17 00:00:00 2001 From: zhanglitao Date: Thu, 2 Nov 2023 22:41:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=B8=83=E5=B1=80=E6=97=B6?= =?UTF-8?q?=E5=AF=B9=E5=AE=BD=E5=BA=A6=E8=BF=9B=E8=A1=8C=E5=8F=96=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanglitao --- txt/src/txt/paragraph_txt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/txt/src/txt/paragraph_txt.cc b/txt/src/txt/paragraph_txt.cc index ba6c4fb5..e0932702 100644 --- a/txt/src/txt/paragraph_txt.cc +++ b/txt/src/txt/paragraph_txt.cc @@ -697,7 +697,7 @@ void ParagraphTxt::ComputePlaceholder(PlaceholderRun* placeholder_run, // -Calculate line vertical layout (ascent, descent, etc) // -Store per-line metrics void ParagraphTxt::Layout(double width) { - double rounded_width = width; + double rounded_width = floor(width); // Do not allow calling layout multiple times without changing anything. if (!needs_layout_ && rounded_width == width_) { return; -- Gitee