GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — Implement Type-1 decryption by jkseppan · Pull Request #20634 · matplotlib/matplotlib Conversation
| ||||||||||||||||||||||||
| @@ -0,0 +1,8 @@ | |||
| Type1Font objects now decrypt the encrypted part | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be an API note rather than whats-new. I'm not sure this is really a user-facing feature, even if it is public.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @staticmethod | ||
| def _decrypt(ciphertext, key, ndiscard=4): | ||
| """ | ||
| Decrypt ciphertext using the Type-1 font algorithm |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is there a reference to the "encryption" we can add here? Also is decrypt the right word? Its really just obfuscated at this point?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The reference is the manual referenced in the file docstring. The manual uses the words "encrypt" and "decrypt", so I think it is best to follow its terminology.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could we consider defering most of type1's handling to fonttools as well instead? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I tried - its type-1 implementation is very incomplete and not sufficient for subsetting. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK then. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just some minor points, please address them (or explicitly reject them if you don't want to make the changes), then this can be self-merged.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
With this I can produce smaller pdf files with usetex in some small tests, but this obviously needs more extensive testing, thus marking as draft. On top of matplotlib#20634 and matplotlib#20715. Closes matplotlib#127.
|
Thanks for the review @anntzer - I made the changes. I'll wait for the CI to complete before merging. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jkseppan if one of us doesn't get to it, feel free to self-merge when CI is all green. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
This is a prerequisite of subsetting.
The zeros at the end are not needed by our implementation so don't crash if there are too few. Always pass an even number of bytes to unhexlify.
With this I can produce smaller pdf files with usetex in some small tests, but this obviously needs more extensive testing, thus marking as draft. On top of matplotlib#20634 and matplotlib#20715. Closes matplotlib#127.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.