From 09a9878bcc47d7b86f1e53d9a29da389da4b4c7b Mon Sep 17 00:00:00 2001 From: zhanglitao Date: Mon, 23 Oct 2023 14:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=89=E6=A0=87=E5=81=8F?= =?UTF-8?q?=E7=A7=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanglitao --- engine/flutter/third_party/txt/src/txt/paragraph_txt.cc | 2 +- txt/src/txt/paragraph_txt.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/flutter/third_party/txt/src/txt/paragraph_txt.cc b/engine/flutter/third_party/txt/src/txt/paragraph_txt.cc index 68874ba0..09242c67 100644 --- a/engine/flutter/third_party/txt/src/txt/paragraph_txt.cc +++ b/engine/flutter/third_party/txt/src/txt/paragraph_txt.cc @@ -1145,7 +1145,7 @@ void ParagraphTxt::Layout(double width) { line_heights_.push_back((line_heights_.empty() ? 0 : line_heights_.back()) + ceil(max_ascent + max_descent)); line_baselines_.push_back(line_heights_.back() - max_descent); - y_offset += round(max_ascent + prev_max_descent); + y_offset += ceil(max_ascent + prev_max_descent); prev_max_descent = max_descent; // The max line spacing and ascent have been multiplied by -1 to make math diff --git a/txt/src/txt/paragraph_txt.cc b/txt/src/txt/paragraph_txt.cc index b7220340..e0932702 100644 --- a/txt/src/txt/paragraph_txt.cc +++ b/txt/src/txt/paragraph_txt.cc @@ -1225,7 +1225,7 @@ void ParagraphTxt::Layout(double width) { ceil(max_ascent + max_descent); line_metrics.baseline = line_metrics.height - max_descent; - y_offset += round(max_ascent + prev_max_descent); + y_offset += ceil(max_ascent + prev_max_descent); prev_max_descent = max_descent; line_metrics.line_number = line_number; -- Gitee