(mPDF >= 2.3 <6.0)
autoFontGroupSize – Specify the chunk size of text to group when auto-detecting languages using SetAutoFont
Specify the chunk size of text to group when auto-detecting languages using SetAutoFont().
Bigger chunks (3) allows reversal of whole sentences of RTL text, not just letters in individual words; the disadvantage is that it may include bits of other languages either side, forcing them in the font used for the “foreign” language.
Smaller chunks (1) - analysing word by word - takes more processing time, and cannot reverse RTL sentences. In text with CJK language, it makes it harder for mPDF to correctly identify between e.g. Korean and Chinese which share some characters. Thus words may be identified alternately as Korean or Chinese.
1: individual words are analysed
2: words are analysed to see if they are distinctive of a particular language, and then surrounding text that is compatible is grouped together with these words
3: as big chunks as possible are grouped, including ASCII characters and punctuation
|2.3||Variable was added.|
- useLang - Specify whether to recognise and support the HTML attribute lang
- SetAutoFont() - Use AutoFont to auto-detect text language in HTML input
- disableMultilingualJustify - Specify whether to disable text justification in multilingual documents
- lang - Information on mPDF support for the HTML attribute lang