Repository navigation
Drop support for font hinting factor - #31521
Merged
Merged
Conversation
rcomer
reviewed
Apr 18, 2026
rcomer
left a comment
Member
There was a problem hiding this comment.
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++.
tacaswell
reviewed
Apr 20, 2026
tacaswell
approved these changes
Apr 20, 2026
tacaswell
left a comment
Member
There was a problem hiding this comment.
Maybe we should add an API change note for the FT2Font deprecation.
ksunden
approved these changes
Apr 20, 2026
Member
|
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
force-pushed
the
drop-hinting-factor
branch
from
April 20, 2026 23:36
48ddb61 to
f9c14f3
Compare
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
force-pushed
the
drop-hinting-factor
branch
from
April 20, 2026 23:57
f9c14f3 to
a7cfac8
Compare
5 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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