Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
pdf/ps: Track full character map in CharacterTracker#30566
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
By tracking both character codes and glyph indices, we can handleproducing multiple font subsets if needed by a file format.
glyphs=self._character_tracker.used.get(filename) | ||
ifglyphs: | ||
fonts[Fx]=self.embedTTF(filename,glyphs) | ||
charmap=self._character_tracker.used.get((filename,0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
do we need to loop and add all the partitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah, this looks like more prep work as I see we never set subset size.
"power cycled" to drop the already merged commit from the diff. |
ifnotmpl.rcParams['ps.useafm']: | ||
forfont_path,glyphsinps_renderer._character_tracker.used.items(): | ||
ifnotglyphs: | ||
for (font,subset_index),charmapin \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
but we do loop here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
PS is a little different from PDF in that it just dumps all the fonts in theCharacterTracker
instance, while PDF has its own tracking of fonts, so it needs a bit more in-depth change (that continues on#30512.)
This change here doesn't modify any logic, but just changes the loop to work over the new structure of the.used
attribute.
I am a bit confused by the sub-setting logic. I think I've lost track of "is implemented" vs "will be implemented". |
We understand both the macos 13 and mypy failures as unrelated. |
43d5d4e
intomatplotlib:text-overhaulUh oh!
There was an error while loading.Please reload this page.
Yes, I'll merge |
PR summary
By tracking both character codes and glyph indices, we can handle producing multiple font subsets if needed by a file format.
This was split out of#30512, but based on#30335.
PR checklist