#include <font.h>
|
| Font (const GlyphData *data, int data_nr, int baseline, int height, uint8_t bpp=1) |
| Construct the font with the given glyphs. More...
|
|
int | match_next_glyph (const uint8_t *str, int *match_length) |
|
void | print (int x_start, int y_start, display::Display *display, Color color, const char *text, Color background) override |
|
void | measure (const char *str, int *width, int *x_offset, int *baseline, int *height) override |
|
int | get_baseline () |
|
int | get_height () |
|
int | get_bpp () |
|
const std::vector< Glyph, ExternalRAMAllocator< Glyph > > & | get_glyphs () const |
|
Definition at line 44 of file font.h.
◆ Font()
esphome::font::USE_DISPLAY::Font |
( |
const GlyphData * |
data, |
|
|
int |
data_nr, |
|
|
int |
baseline, |
|
|
int |
height, |
|
|
uint8_t |
bpp = 1 |
|
) |
| |
Construct the font with the given glyphs.
- Parameters
-
glyphs | A vector of glyphs, must be sorted lexicographically. |
baseline | The y-offset from the top of the text to the baseline. |
bottom | The y-offset from the top of the text to the bottom (i.e. height). |
◆ get_baseline()
int esphome::font::USE_DISPLAY::get_baseline |
( |
| ) |
|
|
inline |
◆ get_bpp()
int esphome::font::USE_DISPLAY::get_bpp |
( |
| ) |
|
|
inline |
◆ get_glyphs()
◆ get_height()
int esphome::font::USE_DISPLAY::get_height |
( |
| ) |
|
|
inline |
◆ match_next_glyph()
int esphome::font::USE_DISPLAY::match_next_glyph |
( |
const uint8_t * |
str, |
|
|
int * |
match_length |
|
) |
| |
◆ measure()
void esphome::font::USE_DISPLAY::measure |
( |
const char * |
str, |
|
|
int * |
width, |
|
|
int * |
x_offset, |
|
|
int * |
baseline, |
|
|
int * |
height |
|
) |
| |
|
override |
◆ print()
void esphome::font::USE_DISPLAY::print |
( |
int |
x_start, |
|
|
int |
y_start, |
|
|
display::Display * |
display, |
|
|
Color |
color, |
|
|
const char * |
text, |
|
|
Color |
background |
|
) |
| |
|
override |
◆ baseline_
int esphome::font::USE_DISPLAY::baseline_ |
|
protected |
◆ bpp_
uint8_t esphome::font::USE_DISPLAY::bpp_ |
|
protected |
◆ glyphs_
◆ height_
int esphome::font::USE_DISPLAY::height_ |
|
protected |
The documentation for this class was generated from the following file:
- /opt/build/esphome/esphome/components/font/font.h