cmu-cs-academy / desktop-cmu-graphics

BSD 3-Clause "New" or "Revised" License
15 stars 9 forks source link

Fix cairo 1.18.0 mac crash, upgrade certifi, always use our libs when zip-installed #50

Closed schmave closed 10 months ago

schmave commented 11 months ago

https://cmu-cs-academy.atlassian.net/browse/CSA-1052

The following code crashes on Mac when run with:

import cairo
fontCtx = cairo.Context(cairo.ImageSurface(cairo.FORMAT_ARGB32, 0, 0))
fontCtx.text_extents('Hello, world!')

import pygame
pygame.init()
schmave commented 11 months ago

test_image_gen is failing for pip-based installs on Mac because the inspector labels aren't bold, nor is the "Exception! App stopped!" error.

Screen Shot 2023-10-20 at 2 34 38 PM

Screen Shot 2023-10-20 at 2 34 27 PM

schmave commented 11 months ago

The inspector looks right to me when I run it outside of test_image_gen, and this is a big improvement over the current state of affairs where labels are unusable when using cairo 1.18. But maybe we should see what's going wrong with the tests too.

schmave commented 10 months ago

Reported to pygame here: https://github.com/pygame/pygame/issues/4060

schmave commented 10 months ago

Ready for one more look @austin-schick

schmave commented 10 months ago

Cairo isn't letting us draw bold/italic text on Mac, so that's why the CI build is still failing. https://github.com/pygobject/pycairo/issues/351