From 69c5095890717acc4dc84ac9c12bf529b22296fd Mon Sep 17 00:00:00 2001 From: JediKev <kevin@enhancesoft.com> Date: Wed, 10 Jul 2019 12:15:31 -0500 Subject: [PATCH] issue: PDF Squares Instead Of Text This addresses an issue with Thai fonts (and a few others like Hebrew, Arabic, etc.) where printing a PDF will show square characters instead of the actual content. This is due to `autoScriptToLang` and `autoLangToFont` not being set to `TRUE`. This updates the mPDF config to set the value of `autoScriptToLang` to `TRUE` as this formats the HTML using the lang attribute for the specific language of the content. In addition, this updates the mPDF config to set `autoLangToFont` to `TRUE` as this selects the correct font to use for the specific language of the content. https://mpdf.github.io/fonts-languages/automatic-font-selection.html --- include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php b/include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php index 95633de2a..8bd319382 100755 --- a/include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php +++ b/include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php @@ -93,12 +93,12 @@ class ConfigVariables // AUTOMATIC FONT SELECTION // Based on script and/or language // mPDF 6.0 (similar to previously using function SetAutoFont() ) - 'autoScriptToLang' => false, + 'autoScriptToLang' => true, 'baseScript' => Ucdn::SCRIPT_LATIN, 'autoVietnamese' => true, 'autoArabic' => true, // mPDF 6.0 (similar to old useLang) - 'autoLangToFont' => false, + 'autoLangToFont' => true, // Substitute missing characters in UTF-8(multibyte) documents - from other fonts 'useSubstitutions' => false, -- GitLab