NanoFont class implements work with fonts provided by the library: loading fonts, providing their parameters.
More...
#include <font.h>
|
| static uint16_t | unicode16FromUtf8 (uint8_t ch) |
| | Returns 16-bit unicode char, encoded in utf8 SSD1306_MORE_CHARS_REQUIRED if more characters is expected. More...
|
| |
NanoFont class implements work with fonts provided by the library: loading fonts, providing their parameters.
Definition at line 45 of file font.h.
◆ NanoFont()
◆ getCharBitmap()
| void NanoFont::getCharBitmap |
( |
uint16_t |
ch, |
|
|
SCharInfo * |
info |
|
) |
| |
◆ getHeader()
Returns reference to SFontHeaderRecord.
This record contains some useful information on font like width, height, etc.
Definition at line 142 of file font.h.
◆ getTextSize()
returns text width in pixels (and its height if height is requested)
Returns text width in pixels (and its height if height is requested)
- Parameters
-
| text | pointer to null-terminated string |
| height | pointer to lcduint_t variable to store height to. nullptr if height is not required |
◆ loadFixedFont()
| void NanoFont::loadFixedFont |
( |
const uint8_t * |
progmemFont | ) |
|
Function allows to set another fixed font for the library.
By default, the font supports only first 128 - 32 ascii chars. Please refer to github wiki on how to generate new fonts.
- Parameters
-
| progmemFont | - font to setup located in Flash area |
◆ loadFreeFont()
| void NanoFont::loadFreeFont |
( |
const uint8_t * |
progmemFont | ) |
|
Function allows to set another free font for the library.
By default, the font supports only first 128 - 32 ascii chars. Please refer to github wiki on how to generate new fonts.
- Parameters
-
| progmemFont | - font to setup located in Flash area |
◆ loadSecondaryFont()
| void NanoFont::loadSecondaryFont |
( |
const uint8_t * |
progmemUnicode | ) |
|
Function allows sets secondary font for specific language.
Use it if you want to use additional font to combine capabilities of ascii fonts and language specific font.
- Parameters
-
| progmemUnicode | font containing unicode table (refer to ssd1306xled_font6x8_German as example). |
◆ setSpacing()
| void NanoFont::setSpacing |
( |
uint8_t |
spacing | ) |
|
|
inline |
Sets spacing in pixels between 2 nearest characters.
- Parameters
-
Definition at line 152 of file font.h.
◆ unicode16FromUtf8()
| static uint16_t NanoFont::unicode16FromUtf8 |
( |
uint8_t |
ch | ) |
|
|
static |
Returns 16-bit unicode char, encoded in utf8 SSD1306_MORE_CHARS_REQUIRED if more characters is expected.
- Parameters
-
| ch | character byte to decode |
- Returns
- 16-bit unicode char, encoded in utf8 SSD1306_MORE_CHARS_REQUIRED if more characters is expected
The documentation for this class was generated from the following file: