From bead9644c56575c7670d1ef1cc2762f73c34e683 Mon Sep 17 00:00:00 2001 From: dongqing Date: Thu, 5 Dec 2019 10:36:10 +0800 Subject: [PATCH] fix --- lib/pen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pen.js b/lib/pen.js index 4bfed02..47f8c1f 100644 --- a/lib/pen.js +++ b/lib/pen.js @@ -547,7 +547,7 @@ export default class Painter { } let lineIndex = 0; for (let j = 0; j < textArray.length; ++j) { - const preLineLength = Math.floor(textArray[j].length / linesArray[j]); + const preLineLength = Math.ceil(textArray[j].length / linesArray[j]); let start = 0; let alreadyCount = 0; for (let i = 0; i < linesArray[j]; ++i) {