🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 17, 2025

PR summary

Since we pass the filename to io.open, we can accept everything it can.

Also, fix the return value of FT2Font.fname, which could be bytes if that was initially provided.

I extracted this out of #30334 since it's independent

PR checklist

@QuLogic QuLogic added this to the v3.11.0 milestone Sep 17, 2025
@github-project-automation github-project-automation bot moved this to Waiting for other PR in Font and text overhaul Sep 17, 2025
@QuLogic QuLogic moved this from Waiting for other PR to Ready for Review in Font and text overhaul Sep 17, 2025
Since we pass the filename to `io.open`, we can accept everything it
can.

Also, fix the return value of `FT2Font.fname`, which could be `bytes` if
that was initially provided.
with pytest.raises(FileNotFoundError):
get_font(bytes(tmp_path / 'non-existent-font-name.ttf'))

# Not really public, but get_font doesn't expose non-filename constructor.
Copy link
Member

Choose a reason for hiding this comment

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

note to future reviewers, this was removed as redundent with other test

@tacaswell tacaswell merged commit 1b3ba17 into matplotlib:text-overhaul Sep 25, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Font and text overhaul Sep 25, 2025
@QuLogic QuLogic deleted the font-pathlike branch September 25, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants