X Tutup
Skip to content

ft2font: Extend OS/2 table with new fields#31050

Merged
QuLogic merged 1 commit intomatplotlib:text-overhaulfrom
QuLogic:extend-os2-table
Feb 5, 2026
Merged

ft2font: Extend OS/2 table with new fields#31050
QuLogic merged 1 commit intomatplotlib:text-overhaulfrom
QuLogic:extend-os2-table

Conversation

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Jan 31, 2026

PR summary

Versions 1, 2, and 5 add additional fields to this struct, which may or may not be useful in the future.

PR checklist

@QuLogic QuLogic added this to the v3.11.0 milestone Jan 31, 2026
@github-project-automation github-project-automation bot moved this to Waiting for other PR in Font and text overhaul Jan 31, 2026
@QuLogic QuLogic moved this from Waiting for other PR to Ready for Review in Font and text overhaul Jan 31, 2026
"fsFirstCharIndex"_a=t->usFirstCharIndex,
"fsLastCharIndex"_a=t->usLastCharIndex);
if (version >= 1) {
result["ulCodePageRange1"] = t->ulCodePageRange1;
Copy link
Contributor

Choose a reason for hiding this comment

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

make this a tuple, similarly to how we deal with ulCharRange just above?

@llohse
Copy link

llohse commented Feb 2, 2026

Exposing 'sxHeight' would be very handy for rendering of OpenType math fonts (see #31048). Currently, x-height is tried to be read from the pclt table, which is "strongly discouraged" and nonexistent in most modern fonts, and measured otherwise.
https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/_mathtext.py#L404

@QuLogic
Copy link
Member Author

QuLogic commented Feb 3, 2026

Yes, sxHeight is how I came across these missing fields.

Versions 1, 2, and 5 add additional fields to this struct, which may or
may not be useful in the future.
@QuLogic QuLogic merged commit b736a90 into matplotlib:text-overhaul Feb 5, 2026
32 of 37 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Font and text overhaul Feb 5, 2026
@QuLogic QuLogic deleted the extend-os2-table branch February 5, 2026 21:16
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Mar 2, 2026
Apparently, when adding the additional fields in matplotlib#31050, I never noticed
that some of the required fields were not exposed.

Also, fix a few typos in the field names.
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Mar 2, 2026
Apparently, when adding the additional fields in matplotlib#31050, I never noticed
that some of the required fields were not exposed.

Also, fix a few typos in the field names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup