src_c/_freetype.c

This extension module defines Python type pygame.freetype.FontCreate a new Font instance from a supported font file..

Header file: src_c/include/pygame_freetype.h

type pgFontObject

The pygame.freetype.Font instance C struct.

type pgFont_Type

The pygame.freetype.Font Python type.

PyObject *pgFont_New(const char *filename, long font_index)

Open the font file with path filename and return a new new pygame.freetype.Font instance for that font. Set font_index to 0 unless the file contains multiple, indexed, fonts. On error raise a Python exception and return NULL.

int pgFont_Check(PyObject *x)

Return true if x is a pygame.freetype.Font instance. Will return false for a subclass of Font. This is a macro. No check is made that x is not NULL.

int pgFont_IS_ALIVE(PyObject *o)

Return true if pygame.freetype.Font object o is an open font file. This is a macro. No check is made that o is not NULL or not a Font instance.




Edit on GitHub