mPDF Manual – What Else Can I Do

# Combining Diacritics

In Unicode, letters with diacritics (e.g. ÁáȦȧÄä) are usually represented as a single character e.g. Unicode U+0196 is an A Umlaut. There are 4 blocks in Unicode of diacritics or ‘marks’ which can be used to combine with adjacent letters: Combining Diacritical Marks (U+0300 - U+036F), Combining Diacritical Marks Supplement (U+1DC0 - U+1DFF), Combining Marks for Symbols(U+20D0 - U+20FF) and Combining Half Marks (U+FE20 - U+FE2F).

Software applications use special positioning information stored in OpenType font files to resposition the diacritic/mark depending on the context. mPDF (< v 6.0) does not support this repositioning and is dependent on the font design and original placement of the diacritic:

It is recommended to use precomposed characters whenever possible with mPDF. If not you could use this quick patch to automatically combine diacritics:

In mpdf.php file, function WriteHTML()

Just after the lines:

Then add the following in your script (use $this->compat if you use it in the config.php file) after declaring the class$mpdf: