Skip to content

Ensure text metric calculation always uses the text cache #29907

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2025

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Apr 12, 2025

These locations outside of Text were calling Renderer.get_text_width_height_descent directly which meant that

  1. they were not cached, and
  2. the text_placeholders fixture did not catch their use.

Fortunately, this only affected one test figure.

PR summary

PR checklist

These locations outside of `Text` were calling
`Renderer.get_text_width_height_descent` directly which meant that
1. they were not cached, and 2. the `text_placeholders` fixture did not
catch their use.

Fortunately, this only affected one test figure.
@QuLogic
Copy link
Member Author

QuLogic commented Apr 12, 2025

Unfortunately, I missed this in #29872 because I had only tested with changing the hinting settings originally, and not with FreeType 2.13.3+mpl20 style+hinting, and only the latter changed the height significantly enough to be noticed.

@tacaswell tacaswell merged commit 65d2464 into matplotlib:main Apr 13, 2025
42 of 44 checks passed
@tacaswell
Copy link
Member

The azure failure is 3.10 timing out in a subprocess test.

@QuLogic
Copy link
Member Author

QuLogic commented May 6, 2025

@meeseeksdev backport to v3.10.x

@QuLogic QuLogic modified the milestones: v3.11.0, v3.10.2 May 6, 2025
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 6, 2025
oscargus added a commit that referenced this pull request May 6, 2025
…907-on-v3.10.x

Backport PR #29907 on branch v3.10.x (Ensure text metric calculation always uses the text cache)
@ksunden ksunden mentioned this pull request May 9, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants