-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
File size increased hugely after embeded font through fontkit #207
Comments
Hello @Pomelool! This is normal.
And here are some other examples: pdf-lib/apps/node/tests/test1.ts Lines 168 to 228 in 7e06c40
It's important to note that subsetting does not work for all fonts. This is why the feature is not enabled by default. The subsetting logic resides in the I hope this helps. Please let me know if you have any additional questions! |
Thanks @Hopding . I suggest that you will add this to your documentation in the README.md file |
That's a good idea. It would make a nice addition to the https://github.com/Hopding/pdf-lib#fonts-and-unicode section. Happy to accept PRs for this! |
Sure I will happy to that! |
@Hopding , another question if I may. Is it possible to embed multiple fonts (to increase the chance of successful conversion)? |
I have a pdf that is 600KB, after embeded a font (ttf file of 20MB), and drawed one line with this font, my generated pdf becomes 9mb. Is this a normal behavior? Or am I doing something wrong?
Is there a way to subsetting a font instead of embedding the whole font?
The text was updated successfully, but these errors were encountered: