Functions that load fonts.
More...
|
bool | gslc_FontAdd (gslc_tsGui *pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void *pvFontRef, uint16_t nFontSz) |
| Load a font into the local font cache and assign font ID (nFontId). More...
|
|
bool | gslc_FontSet (gslc_tsGui *pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void *pvFontRef, uint16_t nFontSz) |
| Load a font into the local font cache and store as font ID (nFontId) More...
|
|
gslc_tsFont * | gslc_FontGet (gslc_tsGui *pGui, int16_t nFontId) |
| Fetch a font from its ID value. More...
|
|
bool | gslc_FontSetMode (gslc_tsGui *pGui, int16_t nFontId, gslc_teFontRefMode eFontMode) |
| Set the font operating mode. More...
|
|
Functions that load fonts.
Load a font into the local font cache and assign font ID (nFontId).
- Font is stored into next available internal array element
- NOTE: Use FontSet() instead
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nFontId | ID to use when referencing this font |
[in] | eFontRefType | Font reference type (eg. filename or pointer) |
[in] | pvFontRef | Reference pointer to identify the font. In the case of SDL mode, it is a filepath to the font file. In the case of Arduino it is a pointer value to the font bitmap array (GFXFont) |
[in] | nFontSz | Typeface size to use (only used in SDL mode) |
- Returns
- true if load was successful, false otherwise
Fetch a font from its ID value.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nFontId | ID value used to reference the font (supplied originally to gslc_FontAdd() |
- Returns
- A pointer to the font structure or NULL if error
Load a font into the local font cache and store as font ID (nFontId)
- Font is stored into index nFontId, so nFontId must be from separate font enum (0-based).
- Example: enum { E_FONT_BTN, E_FONT_TXT, MAX_FONT };
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nFontId | ID to use when referencing this font |
[in] | eFontRefType | Font reference type (eg. filename or pointer) |
[in] | pvFontRef | Reference pointer to identify the font. In the case of SDL mode, it is a filepath to the font file. In the case of Arduino it is a pointer value to the font bitmap array (GFXFont) |
[in] | nFontSz | Typeface size to use (only used in SDL mode) |
- Returns
- true if load was successful, false otherwise
Set the font operating mode.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nFontId | ID value used to reference the font (supplied originally to gslc_FontAdd() |
[in,out] | eFontMode | Font mode to assign to this font |
- Returns
- true if success