This commit is contained in:
Gabor Kiss-Vamosi
2021-03-04 19:41:55 +01:00
parent 586542ddce
commit 42ab81cac5

View File

@@ -2106,11 +2106,13 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes =
/*-------------------- /*--------------------
* ALL CUSTOM DATA * ALL CUSTOM DATA
*--------------------*/ *--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
static lv_font_fmt_txt_glyph_cache_t cache;
/*Store all the custom data of the font*/ /*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = { static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = gylph_bitmap, .glyph_bitmap = gylph_bitmap,
.glyph_dsc = glyph_dsc, .glyph_dsc = glyph_dsc,
.cmaps = cmaps, .cmaps = cmaps,
@@ -2120,7 +2122,9 @@ static const lv_font_fmt_txt_dsc_t font_dsc = {
.bpp = 4, .bpp = 4,
.kern_classes = 1, .kern_classes = 1,
.bitmap_format = 0, .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache .cache = &cache
#endif
}; };
/*----------------- /*-----------------
@@ -2128,7 +2132,11 @@ static const lv_font_fmt_txt_dsc_t font_dsc = {
*----------------*/ *----------------*/
/*Initialize a public general font descriptor*/ /*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t lv_font_montserrat_14 = { const lv_font_t lv_font_montserrat_14 = {
#else
lv_font_t lv_font_montserrat_14 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 16, /*The maximum line height required by the font*/ .line_height = 16, /*The maximum line height required by the font*/