LRaspi  2022.1
A Lua Player for Rasberry Pi
Font module

Typedefs

typedef struct lraspi_Font lraspi_Font
 

Functions

lraspi_Fontlraspi_font_new (const char *font_file, int size)
 Loads a font file onto the memory. More...
 
void lraspi_font_free (lraspi_Font *font)
 Releases a font from memory. More...
 
void lraspi_font_setdefault (lraspi_Font *font)
 Sets the current default font. More...
 
lraspi_Fontlraspi_font_getdefault ()
 Gets the current default font. More...
 
const char * lraspi_font_tostring (lraspi_Font *font)
 Gets the string representation of the image.
 

Detailed Description

Functions to loads font files and manipulate them.

Typedef Documentation

◆ lraspi_Font

typedef struct lraspi_Font lraspi_Font

Represents a font object.

Function Documentation

◆ lraspi_font_free()

void lraspi_font_free ( lraspi_Font font)

Releases a font from memory.

Parameters
fontThe font which will be released.

◆ lraspi_font_getdefault()

lraspi_Font* lraspi_font_getdefault ( )

Gets the current default font.

Returns
A font object.

◆ lraspi_font_new()

lraspi_Font* lraspi_font_new ( const char *  font_file,
int  size 
)

Loads a font file onto the memory.

Parameters
font_filePath of the font file.
sizeSize of the glyphs.
Returns
A font object.

◆ lraspi_font_setdefault()

void lraspi_font_setdefault ( lraspi_Font font)

Sets the current default font.

Parameters
fontThe font to set as default, NULL to reset it.