pygame.font.SysFont() takes about 5 seconds on macOS

Viewed 271

I'm using pygame 2.0.0.dev15 to develop games with Python. Everything works great so far, but I'm surprised that pygame.font.SysFont() takes a lot of time to process.

Whenever I use fonts in my game, the startup takes about 5 seconds more than without them. The number of fonts I use doesn't seem to slow it down - it's just that first pygame.font.SysFont() call doing that. Something is definitely wrong. I'm on macOS Catalina, using Python 3.8.6.

The problem is gone when I use pygame.font.Font() instead.

Why does pygame.font.SysFont() take so much time?

1 Answers

It is because different operating systems have different speeds.

Related