-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Issue with custom font - Myriad-Pro-Bold #2921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
jsPDF supports only a subset of ttf fonts. Maybe its something similar as this: #2710 (comment)? |
@HackbrettXXX Not very sure about that because when I use |
Your code seems to be correct, so I assume it's either a bug in jsPDF or jsPDF simply does not support such kinds of fonts. For some reason GlyfTable.parse is not called. Probably because |
@HackbrettXXX I think it is some problem with the variable of that fonts, I try with the same font name, but get the font from other source and it works for me now If that something can be resolveable then it will good to fix, otherwise we need to learn which type of font supported and document it This is the same font but work for me - https://github.com/celsodantas/wak/blob/master/app/assets/stylesheets/fonts/MyriadPro-Regular.ttf |
Yeah, I think it's the way the font is encoded. You can encode the same font in multiple ways in the ttf format. |
I can take a look at this issue :) |
After small investigation I would say that this is font-related problem. Despite the fact that font https://fontsgeek.com/fonts/Myriad-Pro-Bold has TTF type in description, as I understand it is not TrueType font in the end (probably it should have I changed file extension from From the code point of view @HackbrettXXX was right, |
@listopadiya Thanks for the investigation. OTF fonts are not supported, but there is an open feature request: #2276. I added a comment about the CFF tables. I think we can close this now. |
I try to add custom font but it seem doesn't work with all font
I can get Roboto.ttf work but it doesn't work with this font - https://fontsgeek.com/fonts/Myriad-Pro-Bold
Got below error
Here is the code I added all the front
Do we have the list or the requirements for the custom font support?
I already try fontconverter provided in other issue and compare base64 are same
The text was updated successfully, but these errors were encountered: