| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
By tracking both character codes and glyph indices, we can handle producing multiple font subsets if needed by a file format.
| glyphs = self._character_tracker.used.get(filename) | ||
| if glyphs: | ||
| fonts[Fx] = self.embedTTF(filename, glyphs) | ||
| charmap = self._character_tracker.used.get((filename, 0)) |
There was a problem hiding this comment.
do we need to loop and add all the partitions?
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, this looks like more prep work as I see we never set subset size.
Sorry, something went wrong.
|
"power cycled" to drop the already merged commit from the diff. |
Sorry, something went wrong.
| if not mpl.rcParams['ps.useafm']: | ||
| for font_path, glyphs in ps_renderer._character_tracker.used.items(): | ||
| if not glyphs: | ||
| for (font, subset_index), charmap in \ |
There was a problem hiding this comment.
but we do loop here?
Sorry, something went wrong.
There was a problem hiding this comment.
PS is a little different from PDF in that it just dumps all the fonts in the CharacterTracker 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.
Sorry, something went wrong.
|
I am a bit confused by the sub-setting logic. I think I've lost track of "is implemented" vs "will be implemented". |
Sorry, something went wrong.
|
We understand both the macos 13 and mypy failures as unrelated. |
Sorry, something went wrong.
Yes, I'll merge main after the macOS CI is fixed |
Sorry, something went wrong.
pdf/ps: Track full character map in CharacterTracker
| Back | FazBrowse Home | New Git URL |
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