Fonts for pdf
-
Hello,
I am using the latest version of the plugin, as well as wordpress 5.7, and I have a problem displaying custom fonts on the pdf.
I have followed the instructions of the documentation for the custom fonts declarations, the personal template, the fonts directory which contains my 3 custom fonts, and yet, two of them are not displayed on the pdf.
They are replaced by Times New Roman.It’s strange because when I ask for an html output, the 3 custom fonts are well displayed.
The only custom font which is well displayed is Apalu.
Here, may style.css:
@font-face { font-family: 'RobotoCondensedBoldItalic'; font-style: normal; font-weight: normal; src: local('RobotoCondensedBoldItalic'), local('RobotoCondensedBoldItalic'), url('https://my-website.tld/wp-content/themes/hermine-child/woocommerce/pdf/template-facture-perso/fonts/RobotoCondensedBoldItalic.ttf') format('truetype'); } @font-face { font-family: 'RobotoLight'; font-style: normal; font-weight: normal; src: local('RobotoLight'), local('RobotoLight'), url('https://my-website.tld/wp-content/themes/hermine-child/woocommerce/pdf/template-facture-perso/fonts/RobotoLight.ttf') format('truetype'); } @font-face { font-family: 'Apalu'; font-style: normal; font-weight: normal; src: local('Apalu'), local('Apalu'), url('https://my-website.tld/wp-content/themes/hermine-child/woocommerce/pdf/template-facture-perso/fonts/Apalu.ttf') format('truetype'); }
And for example, this declaration is well displayed in html, but not in pdf:
.shop-name {font-family: ‘RobotoCondensedBoldItalic’;color:#0e294b;}
So I guess I didn’t make a syntax error and the plugin finds the custom fonts correctly.
In pdf, the only block that is displayed with the right font is:
#remerciements-fact {font-family: ‘Apalu’;color:#0e294b;}Does anyone have an idea to solve this issue ?
Thanks a lot in advance.
Best regards
- The topic ‘Fonts for pdf’ is closed to new replies.