Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Drop support for font hinting factor#31521

Merged
tacaswell merged 1 commit intomatplotlib:mainfrom
QuLogic:drop-hinting-factor
Apr 21, 2026
Merged

Drop support for font hinting factor#31521
tacaswell merged 1 commit intomatplotlib:mainfrom
QuLogic:drop-hinting-factor

Conversation

@QuLogic
Copy link
Copy Markdown
Member

@QuLogic QuLogic commented Apr 17, 2026

PR summary

In #9681 we decided that the hinting factor is not needed with modern font rendering engines, but we only set our defaults to 1. The classic style remained as 8, but our internal testing framework then reset that to 1 as well.

Unfortunately, with the new pipeline, anything other than 1 is broken (cf. SciTools/cartopy#2666), and we were just not seeing it because of the testing override.

As we expect downstreams to have to update results for all the rest of the font changes, there's not much need to preserve this functionality. So like the kerning factor, deprecate the hinting factor setting/parameters, and drop all related code.

This should fix the brokenness in SciTools/cartopy#2666, but I'm running into some deadlock running the whole test suite, so I can only confirm on the few tests that I tried.

AI Disclosure

None

PR checklist

@QuLogic QuLogic requested a review from rcomer April 17, 2026 22:28
@github-project-automation github-project-automation Bot moved this to Waiting for other PR in Font and text overhaul Apr 17, 2026
@QuLogic QuLogic added this to the v3.11.0 milestone Apr 17, 2026
@QuLogic QuLogic added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Apr 17, 2026
@QuLogic QuLogic requested a review from anntzer April 18, 2026 00:34
@QuLogic QuLogic moved this from Waiting for other PR to Ready for Review in Font and text overhaul Apr 18, 2026
Copy link
Copy Markdown
Member

@rcomer rcomer left a comment

Choose a reason for hiding this comment

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

Thanks for this @QuLogic. I have done everything I can think of to confirm this will fix the bunching issue in Cartopy. I’m afraid I don’t think I can help much with the code review here as it’s quite outside my wheelhouse. I don’t even know C/C++.

Comment thread src/ft2font_wrapper.cpp
Copy link
Copy Markdown
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Maybe we should add an API change note for the FT2Font deprecation.

@ksunden
Copy link
Copy Markdown
Member

ksunden commented Apr 20, 2026

Only did not merge because of the open question of the FT2Font change note. I'm good with self merge with or without that change note added

@QuLogic QuLogic force-pushed the drop-hinting-factor branch from 48ddb61 to f9c14f3 Compare April 20, 2026 23:36
In matplotlib#9681 we decided that the hinting factor is not needed with modern
font rendering engines, but we only set our defaults to 1. The classic
style remained as 8, but our internal testing framework then reset that
to 1 as well.

Unfortunately, with the new pipeline, anything other than 1 is broken
(cf. SciTools/cartopy#2666), and we were just
not seeing it because of the testing override.

As we expect downstreams to have to update results for all the rest of
the font changes, there's not much need to preserve this functionality.
So like the kerning factor, deprecate the hinting factor
setting/parameters, and drop all related code.
@QuLogic QuLogic force-pushed the drop-hinting-factor branch from f9c14f3 to a7cfac8 Compare April 20, 2026 23:57
@tacaswell tacaswell merged commit e450468 into matplotlib:main Apr 21, 2026
42 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Font and text overhaul Apr 21, 2026
@QuLogic QuLogic deleted the drop-hinting-factor branch April 21, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend: agg backend: pdf backend: ps Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: rcparams topic: styles topic: text/fonts

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants