Font¶
-
class Font¶
A class to render text.
Public Functions
-
Font(const std::string &fileDir, int ptSize)¶
Create a font.
- Parameters:
fileDir – The directory of the font file.
ptSize – The point size of the font.
-
std::shared_ptr<Texture> render(const std::string &text, bool antialias, Color color, int wrapLength = 0)¶
Render text.
- Parameters:
text – The text to render.
antialias – Whether to antialias the text.
color – The color of the text.
wrapLength – The length to wrap the text.
- Returns:
The rendered text.
-
Font(const std::string &fileDir, int ptSize)¶