https://github.com/tecnickcom/TCPDF/com ... 0c698756d5
Replace the function UTF8StringToArray() in the file tcpdf_fonts.php with this function:
Code: Select all
public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
if ($isunicode) {
// requires PCRE unicode support turned on
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
$carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
} else {
$chars = str_split($str);
$carr = array_map('ord', $chars);
}
if (is_array($currentfont['subsetchars']) && is_array($carr)) {
$currentfont['subsetchars'] += array_fill_keys($carr, true);
} else {
$currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr);
}
return $carr;
}