-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Directly loading custom fonts #2830
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
Thanks for the elaborate issue report. When testing with your test project, it doesn't matter which font version I choose, I always get the same error: jsPDF does only support TTF as font format. Other formats are not supported and there is no plan to support other formats any time soon. We are happy about pull requests from the community, though. |
Thanks for the answer, I changed the example - removed experiments with the .woff format from there. The test using base64 works, but loading directly from a file does not work. To convert to base64 I used your converter i.e. Does he not use the cmap when forming? Do you need a cmap to directly loading? |
Ah, now I could reproduce the issue. I didn't dig into it, but this is already fixed on the current master branch. We will release a new version soon. You can try with the files that are currently in the |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
As mentioned in parallax#2830 it is only TrueType that can be embedded so it's good to make that clear.
Hi, I need to use a custom font Noto Sans. I would like to loading the font file directly, without converting it in bass64. A file was found in your repository where the font was loaded directly:
I tried uploading my own font file in the example as well. But ran into an error:
In this example I tried to loading both directly and via bass64. But only the option for bass64 works.
I was also tried to loading a woff format font in both ways, because this format is of higher priority for me.
But I ran into the same error.
How can I loading the file directly?
Do you support formats other than TTF? Are there any plans for this?
The text was updated successfully, but these errors were encountered: