py-sdl / py-sdl2

Python ctypes wrapper around SDL2
Other
303 stars 49 forks source link

Add the FontTTF bindings for the TTF API #210

Closed a-hurst closed 2 years ago

a-hurst commented 2 years ago

PR Description

This PR adds a new class FontTTF that wraps the SDL_ttf API, and deprecates the existing FontManager class.

The main changes and improvements of the FontTTF class over the FontManager class include:

As part of the bug-fixing process, this PR also makes the TTF and Sprite tests more stable (by manually running garbage collection after each test) and makes the Sprite tests faster.

Merge Checklist