add #ifs
This commit is contained in:
@@ -2106,11 +2106,13 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes =
|
||||
/*--------------------
|
||||
* ALL CUSTOM DATA
|
||||
*--------------------*/
|
||||
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
#if LV_VERSION_CHECK(8, 0, 0)
|
||||
/*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 = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#endif
|
||||
.glyph_bitmap = gylph_bitmap,
|
||||
.glyph_dsc = glyph_dsc,
|
||||
.cmaps = cmaps,
|
||||
@@ -2120,7 +2122,9 @@ static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LV_VERSION_CHECK(8, 0, 0)
|
||||
.cache = &cache
|
||||
#endif
|
||||
};
|
||||
|
||||
/*-----------------
|
||||
@@ -2128,7 +2132,11 @@ static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
*----------------*/
|
||||
|
||||
/*Initialize a public general font descriptor*/
|
||||
#if LV_VERSION_CHECK(8, 0, 0)
|
||||
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_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*/
|
||||
|
||||
Reference in New Issue
Block a user