Dear David,

I'm checking your patch under the latest realease (6.2.10), it seems very interesting (I hope it will get merged soon) !
There seem to be an issue with that patch, on line 921 of tcpdf_fonts.php - the regexp is using a too recent php implementation (AFAIK tcpdf runs at least on php 5.3 - this syntax was added in 5.4) :

    $pfile .= '$kern= ' . preg_replace(['/[\s\n]+/',"/\),/"],['',"),\n"],var_export($kern,1)) .";\n";

Same on lines 5339 & 5353 :
if(isset($u16) && $u16) $txt3.=TCPDF_STATIC::_escape(TCPDF_FONTS::arrUTF8ToUTF16BE([$unicode[$i]], false));
if(isset($u16) && $u16) $txt3=TCPDF_STATIC::_escape(TCPDF_FONTS::arrUTF8ToUTF16BE([$unicode[0]], false));

I've also noticed that $int_len and $getUINT were not declared at line 782 (seems on purpose - as it gets declared directly when starting the function) :
TCPDF_FONTS::parseTtfGposTable($font, $gpo, $length, $kern, $gtc, $int_len, $getUINT);

 

Last edit: Mathieu Masseboeuf 2015-07-30