(mPDF ≥ 5.0)
Note: Prior to mPDF 5.0 there were 2 configurable variables,$this->useSubstitutions and$this->useSubstitutionsMB. controlling behaviour of core fonts and unicode fonts respectively. From mPDF 5.0, character substitution using core fonts is always ON and cannot be disabled by configurable variables.
$this->useSubstitutionsMB is deprecated but it is recognised as an alias for$this->useSubstitutions.$this->useSubstitutions controls behaviour in Unicode font documents.
In documents using core fonts only, only characters included in thewin-1252 codepage are availablein the Arial/Helvetica, Times or Courier fonts. If the document includes characters which are included in the other coreAdobe fonts -Symbols, or Dingbats - thesewill be substituted. Because they are displayed using a different font they may appear ‘odd’.
In Unicode Truetype files, the limitation is whether the font file contains a “glyph” for each character in the document.Character substitution (i.e. substituting a different font solely to display that character) can be enabled by settingtheuseSubstitutionconfiguration variable.
<?php$this->useSubstitutions=true;mPDF will try to find substitutions for any missing characters:
backupSIPFontconfiguration variablebackupSubsFontconfiguration variablesIt is not recommended to enable this for regular use, as it will add to the processing time.