8000 Remove call to nonexistent FT2Font.get_fontsize. by anntzer · Pull Request #9806 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove call to nonexistent FT2Font.get_fontsize. #9806

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
Nov 21, 2017

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Nov 17, 2017

Closes #9788, reproduced here:

/lib/matplotlib/font_manager.py@master#L476

The call to get_fontsize was adding in e34a333 but cannot succeed because such a method was (AFAICT) never implemented on FT2Font. Fortunately, font_manager probably never hits a nonscalable font because that codepath only handles ttf/otf, but that should get cleaned up.

Copy link
Member
@Kojoley Kojoley left a comment

Choose a reason for hiding this comment

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

Remove size_adjust from KNOWN ISSUES section.

@@ -592,7 +584,7 @@ def createFontList(fontfiles, fontext='ttf'):
continue
try:
prop = ttfFontProperty(font)
except (KeyError, RuntimeError, ValueError):
except (KeyError, RuntimeError, ValueError, NotImplementedError):
Copy link
Member

Choose a reason for hiding this comment

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

Maybe print to logging about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already silently drop a bunch of fonts that we don't know how to handle...

@anntzer
Copy link
Contributor Author
anntzer commented Nov 17, 2017

removed ref to size_adjust.

@Kojoley Kojoley added this to the v2.2 milestone Nov 19, 2017
@dstansby dstansby merged commit 813d842 into matplotlib:master Nov 21, 2017
@anntzer anntzer deleted the get_fontsize branch November 21, 2017 16:13
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
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.

4 participants
0