[-] Core: Fix TCPDF encoding for some languages like japan #PSCFV-8096
This commit is contained in:
@@ -54,7 +54,7 @@ class PDFCore
|
||||
public function render($display = true)
|
||||
{
|
||||
$render = false;
|
||||
$this->pdf_renderer->setFontForLang('fr');
|
||||
$this->pdf_renderer->setFontForLang(Context::getContext()->language->iso_code);
|
||||
foreach ($this->objects as $object)
|
||||
{
|
||||
$template = $this->getTemplateObject($object);
|
||||
|
||||
@@ -39,7 +39,7 @@ class PDFGeneratorCore extends TCPDF
|
||||
public $content;
|
||||
public $font;
|
||||
|
||||
public $font_by_lang = array('jp' => 'cid0jp');
|
||||
public $font_by_lang = array('ja' => 'cid0jp');
|
||||
|
||||
|
||||
public function __construct($use_cache = false)
|
||||
@@ -93,11 +93,12 @@ class PDFGeneratorCore extends TCPDF
|
||||
public function setFontForLang($iso_lang)
|
||||
{
|
||||
$this->font = PDFGenerator::DEFAULT_FONT;
|
||||
$this->setHeaderFont(array(PDFGenerator::DEFAULT_FONT, '', PDF_FONT_SIZE_MAIN));
|
||||
$this->setFooterFont(array(PDFGenerator::DEFAULT_FONT, '', PDF_FONT_SIZE_MAIN));
|
||||
if (array_key_exists($iso_lang, $this->font_by_lang))
|
||||
$this->font = $this->font_by_lang[$iso_lang];
|
||||
|
||||
$this->setHeaderFont(array($this->font, '', PDF_FONT_SIZE_MAIN));
|
||||
$this->setFooterFont(array($this->font, '', PDF_FONT_SIZE_MAIN));
|
||||
|
||||
$this->setFont($this->font);
|
||||
}
|
||||
|
||||
|
||||
6
tools/tcpdf/fonts/uni2cid_aj16.php
Normal file
6
tools/tcpdf/fonts/uni2cid_aj16.php
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user