pygame2.freetype
The pygame2.freetype C API contains some objects and functions for
high-quality font, glyph and text operations.
Import
Include headers:
-
int import_pygame2_freetype(void)
- Imports the pygame2.freetype module. This returns 0 on success and
-1 on failure.
Basic Types
-
FontId
A simple font face information structure.
-
int FontId.face_index
- The index number of the font face within the font.
-
FT_Open_Args FontId.open_args
- The arguments used to open the face.
PyFreeTypeFont
-
PyFreeTypeFont
-
PyFreeTypeFont_Type
The PyFreeTypeFont object is suitable for creating and managing fonts, glyph
and text operations and text rendering.
Functions
-
PyFont* PyFreeTypeFont_AsFont(PyObject *obj)
Macro for accessing the pyfont member of the PyFreeTypeFont.
This does not perform any type or argument checks.
-
int PyFreeTypeFont_Check(PyObject *obj)
- Returns true, if the argument is a PyFreeTypeFont or a subclass of
PyFreeTypeFont.
-
PyObject* PyFreeTypeFont_New(const char *font, int ptsize)
- Creates a new PyFreeTypeFont object for the given font and
default point size ptsize. On failure, this returns NULL.