set custom font to Mpdf Plugin V.8~ for php
Вставка
- Опубліковано 19 вер 2024
- 1- upload ttf fonts in path /vendor/mpdf/mpdf/ttfonts
2-define custom font inside "fontdata" object in path /vendor/mpdf/mpdf/src/Config/FontVariables,php
3-change font family to new custom font name
make sure your font type TTF
anyconv.com/ot...
Thank you soo much it worked for me.
you are welcome 🤩
Thank you , you saved me! 🖖🏼
Nice approach , but some people do not like to touch the vendor files while working with composer.
There is a way for adding custom fonts, but this is not what I was looking for.
Thank you it's work correctly.🙋♂
I could do it after removing 'useOTL' and 'useKashida'
can please source code and thanks in advance ,i use laravel 9 but show me this message
Class "Mccarlosen\LaravelMpdf\LaravelMpdfServiceProvider" not found
I have follow your step but not work. what i am wrong?
make sure your font type is ttf type not otf , you can convert it online like : anyconv.com/otf-to-ttf-converter/
لايعمل مع تنفيذ جميع الخطوات
تأكد من نوع الخط .ttf لو النوع otf يمكنك تحويله بسهولة عن طريق مواقع اونلان مثل
anyconv.com/otf-to-ttf-converter