feat(freetype): add invalid font descriptor print
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -181,7 +181,6 @@ void lv_freetype_font_delete(lv_font_t * font)
|
|||||||
LV_ASSERT_NULL(font);
|
LV_ASSERT_NULL(font);
|
||||||
lv_freetype_context_t * ctx = lv_freetype_get_context();
|
lv_freetype_context_t * ctx = lv_freetype_get_context();
|
||||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
||||||
LV_ASSERT_NULL(dsc);
|
|
||||||
LV_ASSERT_FREETYPE_FONT_DSC(dsc);
|
LV_ASSERT_FREETYPE_FONT_DSC(dsc);
|
||||||
|
|
||||||
lv_cache_release(ctx->cache_node_cache, dsc->cache_node_entry, NULL);
|
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) \
|
#define LV_ASSERT_FREETYPE_FONT_DSC(dsc) \
|
||||||
do { \
|
do { \
|
||||||
LV_ASSERT_NULL(dsc); \
|
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)
|
} while (0)
|
||||||
|
|
||||||
#define FT_INT_TO_F26DOT6(x) ((x) << 6)
|
#define FT_INT_TO_F26DOT6(x) ((x) << 6)
|
||||||
|
|||||||
Reference in New Issue
Block a user