From d8e86f7136b8d5040902baadbe1a0e0938ff4024 Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Mon, 28 Aug 2017 12:44:08 +0200 Subject: [PATCH] Update tcpdf_fonts.php #813 Undefined offset: 32766 I get that bug when i import that font: http://www.dafont.com/es/accidental-presiden.font https://sourceforge.net/p/tcpdf/bugs/813/ --- include/tcpdf_fonts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tcpdf_fonts.php b/include/tcpdf_fonts.php index 70ca893..ba89c7c 100644 --- a/include/tcpdf_fonts.php +++ b/include/tcpdf_fonts.php @@ -665,7 +665,7 @@ class TCPDF_FONTS { $glyphIdArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); $offset += 2; } - for ($k = 0; $k < $segCount; ++$k) { + for ($k = 0; $k < $segCount - 1; ++$k) { for ($c = $startCount[$k]; $c <= $endCount[$k]; ++$c) { if ($idRangeOffset[$k] == 0) { $g = ($idDelta[$k] + $c) % 65536;