I'm having trouble getting mPDF to properly render Farsi (Persian) text using custom fonts like BMitra and IRANSans.
Problem:
https://i.sstatic.net/Y4FkQ4x7.png
پیوست is correct!
The main issue is that when I try to generate a PDF with Farsi content, mPDF either fails to load the specified font, or the text appears in a different font altogether. Additionally, I tried enabling OpenType Layout (OTL) features like useOTL and useKashida, but I received an error stating that my font does not support OTL tables:
I'm having trouble getting mPDF to properly render Farsi (Persian) text using custom fonts like BMitra and IRANSans.
Problem: https://i.sstatic.net/Y4FkQ4x7.png پیوست is correct! The main issue is that when I try to generate a PDF with Farsi content, mPDF either fails to load the specified font, or the text appears in a different font altogether. Additionally, I tried enabling OpenType Layout (OTL) features like useOTL and useKashida, but I received an error stating that my font does not support OTL tables:
I attempted using the IRANSans font, but the issue persisted. Here is the relevant part of my PHP code: https://stackoverflow.com/questions/78877952/mpdf-not-loading-custom-persian-font-correctly-bmitra-iransans-for-farsi