Skip to content

Catch OSError for FreeType >= 2.14.0#9481

Closed
radarhere wants to merge 1 commit intopython-pillow:mainfrom
radarhere:freetype
Closed

Catch OSError for FreeType >= 2.14.0#9481
radarhere wants to merge 1 commit intopython-pillow:mainfrom
radarhere:freetype

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Mar 20, 2026

Since #8324 was merged, the modified test has started failing in main - https://github.com/python-pillow/Pillow/actions/runs/23347044302/job/67915216500#step:13:2864

Testing, I find that FreeType 2.13.3 passes, but for FreeType >= 2.14.0, FT_New_Face() returns Invalid_File_Format, a.k.a "broken file". The test file is a font generated by OSS-Fuzz though, so there is no reason it has to be a valid file.

I've updated the test to specifically catch "broken file" for FreeType >= 2.14.0.

As background, the test was originally added in #6846. Coincidentally, it also had a with pytest.raises(OSError):, intending to catch a "Bitmap missing for glyph" error raised by Pillow, but #8324 removed the error itsell.

@radarhere
Copy link
Member Author

I am closing this in favour of #9483

@radarhere radarhere closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant