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

Parse FontBBox in type1font.#30088

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
anntzer wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromanntzer:t1bb
Open

Conversation

anntzer
Copy link
Contributor

... instead of having to go through ft2font in createType1Descriptor just to extract the font bbox, ascender and descender.

FontBBox is gauranteed to exist in the type1 font definition by the standard; its parsing as a size-4 array matches freetype's behavior (see ps_parser_load_field); and using bbox entries as ascender and descender also matches freetype's behavior (T1_Face_Init directly assignsroot->ascender = (FT_Short)(root->bbox.yMax) and likewise for the descender; see also the docs for ascender and descender in FT_FaceRec).

PR summary

PR checklist

... instead of having to go through ft2font in createType1Descriptorjust to extract the font bbox, ascender and descender.FontBBox is gauranteed to exist in the type1 font definition by thestandard; its parsing as a size-4 array matches freetype's behavior (seeps_parser_load_field); and using bbox entries as ascender and descenderalso matches freetype's behavior (T1_Face_Init directly assigns`root->ascender = (FT_Short)(root->bbox.yMax)` and likewise for thedescender; see also the docs for ascender and descender in FT_FaceRec).
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
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp