-
-
Notifications
You must be signed in to change notification settings - Fork 710
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
SVG: Incorrect fonts #1393
Comments
Hello, and thanks a lot for the report! We do some nasty things with CSS in SVG, that’s bad, and there’s actually a TODO about that in code. We may meet other strange problems with that in the future, until we really use computed values instead of re-parsing the CSS rules. At least 08f3a59 fixes your problem with fonts. There’s a lot of work to test and clean the new SVG support, we’ll definitely improve it in future versions. |
Yes, tested on master which produces the correct output. However the PDF becomes 2MB, likely related to:
|
Do you have this problem with the document included in fonts.zip? |
Yes. |
Hmm… Could you please share your PDF? |
This bug is fixed, thanks for the report! The problem was caused by one of your fonts, stored as a TrueType Collection. Font collections are now correctly optimized and stored in the PDF, reducing the PDF size (and the time needed to write the PDF on disk). |
Nice! Thanks for the fix! I can confirm that the fonts sample PDF is now 63KB instead of 2MB. Also, a manual that I am doing some early testing with went from 201MB (garbled titles) to 26MB (readable titles). Seems like the "Helvetica Neue" font is a TrueType Collection on macOS (many fonts are ttc in macOS). Any thoughts on how this issue could generate 175MB embedded fonts in a PDF? There were 2 warnings logged and one of them was likely related to Helvetica Neue (6,2MB ttc) which would also be included in fonts PDF. |
The answer to the last question is: It included the Apple Emoji font collection, for some reason (I have some very experimental CSS).
|
Emoji fonts can be big, and if they’re included in font collections the whole file can be huge. Moreover, the whole collection was fully included for each variant (bold, italic, etc.) found in the document. |
The font selection within SVG seems inconsistent.
In the following sample I believe:
The text was updated successfully, but these errors were encountered: