|
typedef struct _IO_FILE | FILE |
|
|
void | AaddFontx (FontxFile *fx, const char *path) |
|
void | InitFontx (FontxFile *fxs, const char *f0, const char *f1) |
|
bool | OpenFontx (FontxFile *fx) |
|
void | CloseFontx (FontxFile *fx) |
|
void | DumpFontx (FontxFile *fxs) |
|
uint8_t | GetFontWidth (FontxFile *fx) |
|
uint8_t | GetFontHeight (FontxFile *fx) |
|
bool | GetFontx (FontxFile *fxs, uint8_t ascii, uint8_t *pGlyph, uint8_t *pw, uint8_t *ph) |
|
void | Font2Bitmap (uint8_t *fonts, uint8_t *line, uint8_t w, uint8_t h, uint8_t inverse) |
|
void | UnderlineBitmap (uint8_t *line, uint8_t w, uint8_t h) |
|
void | ReversBitmap (uint8_t *line, uint8_t w, uint8_t h) |
|
void | ShowFont (uint8_t *fonts, uint8_t pw, uint8_t ph) |
|
void | ShowBitmap (uint8_t *bitmap, uint8_t pw, uint8_t ph) |
|
uint8_t | RotateByte (uint8_t ch) |
|
Do not use. Low-level library to work with bitmap fonts on the display.
It provides functionality for loading and manipulating font files, rendering fonts and bitmaps to the screen, and performing various transformations on bitmaps. The library also includes a struct, FontxFile, which represents a font file and contains metadata about the font.
This is an internal library and should not be directly used.
◆ FILE
typedef struct _IO_FILE FILE |
◆ AaddFontx()
void AaddFontx |
( |
FontxFile * |
fx, |
|
|
const char * |
path |
|
) |
| |
Adds a font file to the given FontxFile structure.
- Parameters
-
fx | Pointer to the FontxFile structure |
path | Path to the font file |
Definition at line 2 of file fontx.c.
◆ CloseFontx()
Closes the font file.
- Parameters
-
Definition at line 5 of file fontx.c.
◆ DumpFontx()
Dumps the font data stored in the FontxFile structure.
- Parameters
-
Definition at line 6 of file fontx.c.
◆ Font2Bitmap()
void Font2Bitmap |
( |
uint8_t * |
fonts, |
|
|
uint8_t * |
line, |
|
|
uint8_t |
w, |
|
|
uint8_t |
h, |
|
|
uint8_t |
inverse |
|
) |
| |
Converts a font data buffer into a bitmap.
- Parameters
-
fonts | Pointer to the font data buffer |
line | Pointer to the bitmap buffer |
w | Width of the bitmap in pixels |
h | Height of the bitmap in pixels |
inverse | If true, the bitmap will be inverted |
Definition at line 135 of file fontx.c.
◆ GetFontHeight()
Gets the height of a character in the font.
- Parameters
-
- Returns
- The height of a character in pixels
Definition at line 8 of file fontx.c.
◆ GetFontWidth()
Gets the width of a character in the font.
- Parameters
-
- Returns
- The width of a character in pixels
Definition at line 7 of file fontx.c.
◆ GetFontx()
bool GetFontx |
( |
FontxFile * |
fxs, |
|
|
uint8_t |
ascii, |
|
|
uint8_t * |
pGlyph, |
|
|
uint8_t * |
pw, |
|
|
uint8_t * |
ph |
|
) |
| |
Gets the glyph data for the specified ASCII character.
- Parameters
-
fxs | Pointer to the FontxFile structure |
ascii | ASCII value of the character to get the glyph for |
pGlyph | Pointer to the buffer to store the glyph data |
pw | Pointer to the variable to store the width of the glyph |
ph | Pointer to the variable to store the height of the glyph |
- Returns
- True if the glyph was found, false otherwise
Definition at line 9 of file fontx.c.
◆ InitFontx()
void InitFontx |
( |
FontxFile * |
fxs, |
|
|
const char * |
f0, |
|
|
const char * |
f1 |
|
) |
| |
Initializes the given FontxFile structure with the specified font files.
- Parameters
-
fxs | Pointer to the FontxFile structure |
f0 | Path to the 8x16 font file |
f1 | Path to the 16x16 font file |
Definition at line 3 of file fontx.c.
◆ OpenFontx()
Opens the font file and reads the font data into the FontxFile structure.
- Parameters
-
- Returns
- True if the font file was opened successfully, false otherwise
Definition at line 4 of file fontx.c.
◆ ReversBitmap()
void ReversBitmap |
( |
uint8_t * |
line, |
|
|
uint8_t |
w, |
|
|
uint8_t |
h |
|
) |
| |
Reverses the bits in each byte of a bitmap.
- Parameters
-
line | Pointer to the bitmap buffer |
w | Width of the bitmap in pixels |
h | Height of the bitmap in pixels |
Definition at line 12 of file fontx.c.
◆ RotateByte()
uint8_t RotateByte |
( |
uint8_t |
ch | ) |
|
Rotates a byte by 90 degrees.
- Parameters
-
- Returns
- The rotated byte
Definition at line 15 of file fontx.c.
◆ ShowBitmap()
void ShowBitmap |
( |
uint8_t * |
bitmap, |
|
|
uint8_t |
pw, |
|
|
uint8_t |
ph |
|
) |
| |
Displays a bitmap on the screen.
- Parameters
-
bitmap | Pointer to the bitmap buffer |
pw | Width of the font in pixels |
ph | Height of the font in pixels |
Definition at line 14 of file fontx.c.
◆ ShowFont()
void ShowFont |
( |
uint8_t * |
fonts, |
|
|
uint8_t |
pw, |
|
|
uint8_t |
ph |
|
) |
| |
Displays a font on the screen.
- Parameters
-
fonts | Pointer to the font buffer |
pw | Width of the font in pixels |
ph | Height of the font in pixels |
Definition at line 13 of file fontx.c.
◆ UnderlineBitmap()
void UnderlineBitmap |
( |
uint8_t * |
line, |
|
|
uint8_t |
w, |
|
|
uint8_t |
h |
|
) |
| |
Adds an underline to a bitmap.
- Parameters
-
line | Pointer to the bitmap buffer |
w | Width of the bitmap in pixels |
h | Height of the bitmap in pixels |
Definition at line 11 of file fontx.c.