#include <font.h>
|
| | Font (const Glyph *data, int data_nr, int baseline, int height, int descender, int xheight, int capheight, uint8_t bpp=1) |
| | Construct the font with the given glyphs.
|
| |
| int | match_next_glyph (const uint8_t *str, int *match_length) const |
| |
| 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_ascender () |
| |
| int | get_descender () |
| |
| int | get_linegap () |
| |
| int | get_xheight () |
| |
| int | get_capheight () |
| |
| int | get_bpp () |
| |
| const ConstVector< Glyph > & | get_glyphs () const |
| |
Definition at line 47 of file font.h.
◆ Font()
| esphome::font::Font::Font |
( |
const Glyph * | data, |
|
|
int | data_nr, |
|
|
int | baseline, |
|
|
int | height, |
|
|
int | descender, |
|
|
int | xheight, |
|
|
int | capheight, |
|
|
uint8_t | bpp = 1 ) |
Construct the font with the given glyphs.
- Parameters
-
| data | A list of glyphs, must be sorted lexicographically. |
| data_nr | The number of glyphs |
| baseline | The y-offset from the top of the text to the baseline. |
| height | The y-offset from the top of the text to the bottom. |
| descender | The y-offset from the baseline to the lowest stroke in the font (e.g. from letters like g or p). |
| xheight | The height of lowercase letters, usually measured at the "x" glyph. |
| capheight | The height of capital letters, usually measured at the "X" glyph. |
| bpp | The bits per pixel used for this font. Used to read data out of the glyph bitmaps. |
Definition at line 47 of file font.cpp.
◆ get_ascender()
| int esphome::font::Font::get_ascender |
( |
| ) |
|
|
inline |
◆ get_baseline()
| int esphome::font::Font::get_baseline |
( |
| ) |
|
|
inline |
◆ get_bpp()
| int esphome::font::Font::get_bpp |
( |
| ) |
|
|
inline |
◆ get_capheight()
| int esphome::font::Font::get_capheight |
( |
| ) |
|
|
inline |
◆ get_descender()
| int esphome::font::Font::get_descender |
( |
| ) |
|
|
inline |
◆ get_glyphs()
◆ get_height()
| int esphome::font::Font::get_height |
( |
| ) |
|
|
inline |
◆ get_linegap()
| int esphome::font::Font::get_linegap |
( |
| ) |
|
|
inline |
◆ get_xheight()
| int esphome::font::Font::get_xheight |
( |
| ) |
|
|
inline |
◆ match_next_glyph()
| int esphome::font::Font::match_next_glyph |
( |
const uint8_t * | str, |
|
|
int * | match_length ) const |
◆ measure()
| void esphome::font::Font::measure |
( |
const char * | str, |
|
|
int * | width, |
|
|
int * | x_offset, |
|
|
int * | baseline, |
|
|
int * | height ) |
|
overridevirtual |
◆ print()
| void esphome::font::Font::print |
( |
int | x_start, |
|
|
int | y_start, |
|
|
display::Display * | display, |
|
|
Color | color, |
|
|
const char * | text, |
|
|
Color | background ) |
|
overridevirtual |
◆ baseline_
| int esphome::font::Font::baseline_ |
|
protected |
◆ bpp_
| uint8_t esphome::font::Font::bpp_ |
|
protected |
◆ capheight_
| int esphome::font::Font::capheight_ |
|
protected |
◆ descender_
| int esphome::font::Font::descender_ |
|
protected |
◆ glyphs_
◆ height_
| int esphome::font::Font::height_ |
|
protected |
◆ linegap_
| int esphome::font::Font::linegap_ |
|
protected |
◆ xheight_
| int esphome::font::Font::xheight_ |
|
protected |
The documentation for this class was generated from the following files: