From 481e46d365cc03f81a8869e2639004ca00210de7 Mon Sep 17 00:00:00 2001 From: Yuya Yabe Date: Wed, 11 Nov 2020 15:44:33 +0900 Subject: [PATCH] Fix width calc --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index 8b7d812..2f30216 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -6489,7 +6489,7 @@ class TCPDF { // *** very slow *** $l = $this->GetArrStringWidth(TCPDF_FONTS::utf8Bidi(array_slice($chars, $j, ($i - $j)), '', $this->tmprtl, $this->isunicode, $this->CurrentFont)); } else { - $l += $this->GetCharWidth($c); + $l += $this->GetCharWidth($c, ($i+1 < $nb)); } if (($l > $wmax) OR (($c == 173) AND (($l + $tmp_shy_replacement_width) >= $wmax))) { if (($c == 173) AND (($l + $tmp_shy_replacement_width) > $wmax)) {