From 8b75855323218bf49d6108a9e5869be1bec68ce1 Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Thu, 31 Mar 2022 10:54:06 +0200 Subject: Revert "Digression: non-const fonts; compiled image has same size has before so there is no potential advantage" This reverts commit 3c68c2cf9187d15ed8e1b07cde00792056a4d0a1. diff --git a/src/displayapp/fonts/lv_font_sys_48.c b/src/displayapp/fonts/lv_font_sys_48.c index bfc0a15..dfde9ab 100644 --- a/src/displayapp/fonts/lv_font_sys_48.c +++ b/src/displayapp/fonts/lv_font_sys_48.c @@ -299,7 +299,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = { *----------------*/ /*Initialize a public general font descriptor*/ -lv_font_t lv_font_sys_48 = { +const lv_font_t lv_font_sys_48 = { .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 = 46, /*The maximum line height required by the font*/ diff --git a/src/displayapp/fonts/neofont.c b/src/displayapp/fonts/neofont.c index 7a2f89c..cfc8e72 100644 --- a/src/displayapp/fonts/neofont.c +++ b/src/displayapp/fonts/neofont.c @@ -420,7 +420,7 @@ static const uint8_t * neofont15_glyph_bitmap_cb(const lv_font_t * font, uint32_ } /*Describe the properties of a font*/ -lv_font_t neofont15 = { +const lv_font_t neofont15 = { .get_glyph_dsc = neofont15_glyph_dsc_cb, /*Set a callback to get info about gylphs*/ .get_glyph_bitmap = neofont15_glyph_bitmap_cb, /*Set a callback to get bitmap of a glyp*/ .line_height = 18, /*The real line height where any text fits*/ -- cgit v0.10.2