diff --git a/src/lv_font/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c index 403fe26ee..d155cf0f1 100644 --- a/src/lv_font/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -88,6 +88,7 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic } /*Handle compressed bitmap*/ else { +#if LV_USE_FONT_COMPRESSED uint32_t gsize = gdsc->box_w * gdsc->box_h; if(gsize == 0) return NULL; @@ -117,6 +118,9 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic bool prefilter = fdsc->bitmap_format == LV_FONT_FMT_TXT_COMPRESSED ? true : false; decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], decompr_buf, gdsc->box_w, gdsc->box_h, (uint8_t)fdsc->bpp, prefilter); return decompr_buf; +#else /* !LV_USE_FONT_COMPRESSED */ + return NULL; +#endif } /*If not returned earlier then the letter is not found in this font*/