Skip to content
Discussion options

You must be logged in to vote

The Document method subset_fonts() is independent from TextWriter and always works. It will walk through all the PDF pages and collect all their characters by font - but only for those fonts that are no subsets already.
Then present each font with all used chars in the file to fonttools and let it compute a subset font.
If successful (should work for OTF, TTF and WOFF fonts), then the subset fontfile is used to replace the original. Also the font (base) name is prefixed with that PDF-specific 6 character prefix.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@JorjMcKie
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by cbm755
Comment options

You must be logged in to vote
1 reply
@JorjMcKie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants