Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add typing to AFM parser#30134

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

Open
QuLogic wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromQuLogic:afm-typing

Conversation

QuLogic
Copy link
Member

PR summary

Also, check some expected conditions at parse time instead of somewhere during use of the data.

PR checklist

@@ -376,7 +394,8 @@ def get_str_bbox_and_descent(self, s):
except KeyError:
name = 'question'
wx, _, bbox = self._metrics_by_name[name]
total_width += wx + self._kern.get((namelast, name), 0)
total_width += wx
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm uncertain ifWX is the only thing that can be a float, or that's a parsing bug.

@QuLogic
Copy link
MemberAuthor

Also,pyright (though notmypy) notes that since the keys of theFontMetricsHeader are not required, they may cause an exception later in the property getters. Do we want to validate that earlier in the constructor, or mark those are required because we only intend to load known-good files?

Also, check some expected conditions at parse time instead of somewhereduring use of the data.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
Status: Ready for Review
Milestone
v3.11.0
Development

Successfully merging this pull request may close these issues.

1 participant
@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp