Symbol cannot be displayed in TrueType font mode。

LVGL 7.0
hi,When I use TrueType font and run demo, the keyboard can’t display symbol

When I use the built-in font(e.g lv_font_montserrat_20), the keyboard can display symbol.
I don’t know what caused the result。THANKS

After looking at the code, the data of symbol is stored in the built-in font. However, the TTF font I use does not contain symbol data. How can I display symbol with TTF font library?thanks

You change the font to built-in font when you are constructing the key you want to show the symbol. OR you include the font that contains the symbol when you are building your font file (from ttf).

Thank you for your reply,how to include the font that contains the symbol when building your font file (from ttf).?Through the lvgl font tool?

i use utf-8 mode

Add an additional font when converting it using the LVGL font tool. That way you will get an output file which contains both fonts merged together.

Thank you for your reply. I mainly want to set different fonts in the btnmartrix, some need symbol, some don’t need symbol. As long as I can set different styles or fonts in different btnmartrix, I can solve this problem. How can I set fonts for the btnmartrix? I tried the operation, but it didn’t work
lv_obj_set_style_cocal_text_font(btnmatrix,…,font with symbol ); How to set fonts for the btnmartrix?

Haven’t tested it but this should do the trick:

lv_obj_set_style_local_text_font(btnmatrix, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, &font);

lv_obj_set_style_local_text_font(btnmatrix, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, &font);
is worked,thank.