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 — TYP: Make glyph indices distinct from character codes by QuLogic · Pull Request #30143 · matplotlib/matplotlib Conversation
Member
PR summaryPreviously, these were both typed as Unfortunately, you can still go back to the base type, so glyph indices still work as character codes. But this is still sufficient to catch errors such as the wrong call to This depends on #30134. PR checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
QuLogic
force-pushed
the
character-glyph-types
branch
from
387a3c1 to
755eab1
Compare
QuLogic
force-pushed
the
character-glyph-types
branch
2 times, most recently
from
cc4ede1 to
73bd5f5
Compare
QuLogic
marked this pull request as ready for review
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
QuLogic
force-pushed
the
character-glyph-types
branch
2 times, most recently
from
6a03850 to
1cbf39e
Compare
1 task done
Previously, these were both typed as `int`, which means you could mix and match them erroneously. While the character code can't be made a distinct type (because it's used for `chr`/`ord`), typing glyph indices as a distinct type means these can't be fully swapped. Unfortunately, you can still go back to the base type, so glyph indices still work as character codes. But this is still sufficient to catch errors such as the wrong call to `FT2Font.get_kerning` in `_mathtext.py`. The `FontInfo.num` value returned by `TruetypeFonts._get_info` is a character code, but `FT2Font.get_kerning` takes *glyph indices*, meaning that kerning was likely off in most cases.
QuLogic
force-pushed
the
character-glyph-types
branch
from
1cbf39e to
733cd7d
Compare
ksunden
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May have slightly preferred the actual output change to be separated from here, but not too fussed in total. There are only 5 png changes here, the rest are svg, which I'm not concerned about as that is text changes rather than binary files. Thus I'm good with the scale of change in a PR without needing to group these changes. But the typing changes look good, are well reasoned, and look correct.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
tacaswell
approved these changes
wavebyrd
pushed a commit
to wavebyrd/matplotlib
that referenced
this pull request
TYP: Make glyph indices distinct from character codes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |