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:
Support for specifying font sizes in pixel height in addition to pt
Separate FontTTF objects for each font file
Supports left/right/center justification for multiline text
Supports custom line heights for multiline text
More closely matches the usage of the BitmapFont class for better API consistency.
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
[x] the PR has been reviewed and all comments are resolved
PR Description
This PR adds a new class
FontTTF
that wraps theSDL_ttf
API, and deprecates the existingFontManager
class.The main changes and improvements of the
FontTTF
class over theFontManager
class include:BitmapFont
class for better API consistency.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
closes #<issue-number>
to automatically close an issue