Hi to all!
I want to get “lv_font_montserrat_14” as fallback for my user-defined font. Please show me some example.
Or how to integrate special symbols aka LV_SYMBOL_xxx in my font instead of fallback?
maybe this example will help you
Thanks.
There are two user-defined fonts in that example. But I have default “montserrat” font and one user-defined font in my case…
Problem is solved succesfully! Look here:
.fallback = LV_FONT_DEFAULT,
Second answer:
LVGL online font converter has ‘Include another font’ button for font merging.
Hi @Taiga
You can set lv_font_montserrat_14 as a fallback for your custom font by assigning it to the fallback field of your font.
Here’s an example:
lv_font_t *my_font = my_font_load_function();
my_font->fallback = &lv_font_montserrat_14;
lv_obj_t *label = lv_label_create(lv_screen_active());
lv_obj_set_style_text_font(label, my_font, 0);
lv_label_set_text(label, "Hello World!");