Replies: 1 comment 1 reply
-
Well, I guess I didn't read the docs correctly and realised with the help of this video that you can set bold and italics to the same font name by specifying 'style' parameter. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I needed to use a unicode font because other fonts included (times and helvetica) in the module could not print a long hyphen ("–").
So I tried a couple of other fonts, but everytime I try to use a particular font style, I get an "Undefined font" error:
They were added with:
What is the best way to go: should I change the font names in the folder (Roboto-Bold.ttf to RobotoB.ttf and DejaVuSans-Bold.ttf to DejaVuSansB.ttf) for the module to pick them up automatically or should I instead add the bold font and rename it and use that name when I want to use the bold styling as in:
pdf.add_font('robotobold', '', fname='./font/Roboto-Bold.ttf')
?Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions