-
Is your feature request related to a problem? Please describe. for example : pdf already embedded full set of Can we replace the embedded font by just replacing the whole font contents directly? (without re-writing text) reference: Describe the solution you'd like flow description:
expect: Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
No, this is impossible - meaning it cannot ever work. Not even if you wanted to replace a sans font by some other sans font. There are several reasons for this, here are just two:
The next version will however contain a new |
Beta Was this translation helpful? Give feedback.
-
A final comment on this: # assume 'xref1' is the xref of a font you wish to replace
# insert the desired new font:
xref2 = doc._insert_font(filename=...)
str_xref2 = doc.xref_object(xref2) # get definition syntax of new font
doc.update_object(xref1, str_xref2) # replace old font defintion
...
doc.save(..., garbage=3,...) # will remove unused objects |
Beta Was this translation helpful? Give feedback.
No, this is impossible - meaning it cannot ever work. Not even if you wanted to replace a sans font by some other sans font.
There are several reasons for this, here are just two:
The next version will however contain a new
Document.subset_fonts()
that re…