GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ft2font: Extend OS/2 table with new fields by QuLogic · Pull Request #31050 · matplotlib/matplotlib

Conversation

@QuLogic

@QuLogic QuLogic commented Jan 31, 2026

Copy link
Copy Markdown
Member

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

  • [n/a] "closes #0000" is in the body of the PR description to link the related issue
  • new and changed code is tested
  • [n/a] Plotting related features are demonstrated in an example
  • [n/a] New Features and API Changes are noted with a directive and release note
  • [n/a] Documentation complies with general and docstring guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@QuLogic QuLogic added this to the v3.11.0 milestone Jan 31, 2026
@QuLogic QuLogic added the topic: text/fonts label Jan 31, 2026
@QuLogic QuLogic added this to Font and text overhaul 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
anntzer
anntzer reviewed Jan 31, 2026
View reviewed changes
Comment thread src/ft2font_wrapper.cpp Outdated
"fsFirstCharIndex"_a=t->usFirstCharIndex,
"fsLastCharIndex"_a=t->usLastCharIndex);
if (version >= 1) {
result["ulCodePageRange1"] = t->ulCodePageRange1;

@anntzer anntzer Jan 31, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@llohse

llohse commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@QuLogic

QuLogic commented Feb 3, 2026

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@QuLogic
QuLogic force-pushed the extend-os2-table branch from 2122af1 to b922b70 Compare February 3, 2026 04:14
@QuLogic
ft2font: Extend OS/2 table with new fields
2aa38ab
Versions 1, 2, and 5 add additional fields to this struct, which may or
may not be useful in the future.
@QuLogic
QuLogic force-pushed the extend-os2-table branch from b922b70 to 2aa38ab Compare February 3, 2026 09:04
anntzer
anntzer approved these changes Feb 3, 2026
View reviewed changes
tacaswell
tacaswell approved these changes Feb 5, 2026
View reviewed changes
@QuLogic
QuLogic merged commit b736a90 into matplotlib:text-overhaul Feb 5, 2026
32 of 37 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@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 QuLogic mentioned this pull request Feb 7, 2026
mathtext: add support for unicode mathematics fonts #31064
Open
5 tasks
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Mar 2, 2026
@QuLogic
ft2font: Read more entries from OS/2 font table
8ffc95a
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
@QuLogic
ft2font: Read more entries from OS/2 font table
10a6700
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 QuLogic mentioned this pull request Mar 2, 2026
ft2font: Read more entries from OS/2 font table #31226
Merged
1 task done
wavebyrd pushed a commit to wavebyrd/matplotlib that referenced this pull request Mar 13, 2026
@QuLogic
Merge pull request matplotlib#31050 from QuLogic/extend-os2-table
6f5421f
ft2font: Extend OS/2 table with new fields
wavebyrd pushed a commit to wavebyrd/matplotlib that referenced this pull request Mar 13, 2026
@QuLogic
ft2font: Read more entries from OS/2 font table
72aba3b
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

Reviewers

@tacaswell tacaswell tacaswell approved these changes
@anntzer anntzer anntzer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic: text/fonts

Projects

Font and text overhaul
Status: Done

Milestone

v3.11.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@QuLogic @llohse @tacaswell @anntzer
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.