mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
feat(freetype): add invalid font descriptor print
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
01b6861384
commit
46887dbe51
@ -181,7 +181,6 @@ void lv_freetype_font_delete(lv_font_t * font)
|
||||
LV_ASSERT_NULL(font);
|
||||
lv_freetype_context_t * ctx = lv_freetype_get_context();
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
||||
LV_ASSERT_NULL(dsc);
|
||||
LV_ASSERT_FREETYPE_FONT_DSC(dsc);
|
||||
|
||||
lv_cache_release(ctx->cache_node_cache, dsc->cache_node_entry, NULL);
|
||||
|
@ -43,7 +43,8 @@ extern "C" {
|
||||
#define LV_ASSERT_FREETYPE_FONT_DSC(dsc) \
|
||||
do { \
|
||||
LV_ASSERT_NULL(dsc); \
|
||||
LV_ASSERT_MSG(LV_FREETYPE_FONT_DSC_HAS_MAGIC_NUM(dsc), "Invalid font descriptor"); \
|
||||
LV_ASSERT_FORMAT_MSG(LV_FREETYPE_FONT_DSC_HAS_MAGIC_NUM(dsc), \
|
||||
"Invalid font descriptor: 0x%" LV_PRIx32, (dsc)->magic_num); \
|
||||
} while (0)
|
||||
|
||||
#define FT_INT_TO_F26DOT6(x) ((x) << 6)
|
||||
|
Loading…
x
Reference in New Issue
Block a user