Skip to content

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

Open
QuLogic wants to merge 1 commit intomatplotlib:text-overhaulfrom
QuLogic:extend-os2-table
Open

ft2font: Extend OS/2 table with new fields#31050
QuLogic wants to merge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants