Font support use lv_font_dejavu_20_cyrillic or symbol font

Hi all:
I want to change default font to lv_font_dejavu_20_cyrillic or symbol ,but the text can not display , ,it’s ok when use
use lv_font_dejavu_20 , what’s the problem ?
#define LV_FONT_DEFAULT &lv_font_dejavu_20_cyrillic //can not display

Hİ Evan,

You can check this definition.



the conf is
#define USE_LV_FONT_DEJAVU_10 4
#define USE_LV_FONT_SYMBOL_10 4

#define USE_LV_FONT_DEJAVU_20 4
#define USE_LV_FONT_SYMBOL_20 4

#define USE_LV_FONT_DEJAVU_30 4
#define USE_LV_FONT_SYMBOL_30 4

#define USE_LV_FONT_DEJAVU_40 4
#define USE_LV_FONT_SYMBOL_40 4


I’ve tested and works for me with the following settings:

#define USE_LV_FONT_DEJAVU_20              4
#define USE_LV_FONT_SYMBOL_20              4


#define LV_FONT_DEFAULT        &lv_font_dejavu_20_cyrillic  


    lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);
    lv_label_set_text(label, "краткое");

Hi Kisvegabor:
my settings is the same with you , and problem was still exist, my lib version is v5.3

Can you debug your project? If so you you can check the lv_draw_label() function inlv_draw/lv_draw_label.c to see where the drawing fails.

I found it did not call the function lv_draw_label() when use lv_font_dejavu_20_cyrillic

Debug through lv_label_design then.

lv_label_design()funtion also did not be called

Please provide more details. When you were stepping through the code, does the processor halt? Exactly what happens? We need more information to be able to help you.

No, the processor is running, and the other function is ok, only the text can not display

Can you help me to debug it ? You can control my computer by teamvier

static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
/* Normally always will be a top_obj (at least the screen)
* but in special cases (e.g. if the screen has alpha) it won’t.
* In this case use the screen directly */
if(top_p == NULL) top_p = lv_scr_act();

/*Refresh the top object and its children*/
lv_refr_obj(top_p, mask_p);

/*Draw the 'younger' sibling objects because they can be on top_obj */
lv_obj_t * par;
lv_obj_t * i;
lv_obj_t * border_p = top_p;

par = lv_obj_get_parent(top_p);

/*Do until not reach the screen*/
while(par != NULL) {
    /*object before border_p has to be redrawn*/
    i = lv_ll_get_prev(&(par->child_ll), border_p);

    while(i != NULL) {
        /*Refresh the objects*/
        lv_refr_obj(i, mask_p);
        i = lv_ll_get_prev(&(par->child_ll), i);

    /*The new border will be there last parents,
     *so the 'younger' brothers of parent will be refreshed*/
    border_p = par;
    /*Go a level deeper*/
    par = lv_obj_get_parent(par);

/*Call the post draw design function of the parents of the to object*/
par = lv_obj_get_parent(top_p);
while(par != NULL) {
    par->design_func(par, mask_p, LV_DESIGN_DRAW_POST);
    par = lv_obj_get_parent(par);


in the lv_refr_obj_and_children() function , I found it did not
run the code " par->design_func(par, mask_p, LV_DESIGN_DRAW_POST);"

What is the value of par in that function?

the value of par is null

@Evan can you reproduce it in the simulator? If so, please send the simulator project.

OK,Please download the zip from the link , password: cb04 Thanks !

It seems I need to be a baidu user to download the file.

Can you upload it to Dropbox or Google Drive? ,Plase have a try, I dont know can it be download? may be you dont have the download permisson ,my dropbox verison is personal verison

I was able to download it.

You expect to see this text, right?

    lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);
    lv_label_set_text(label, "2222sdad");

However, if you set cyrillic as default font LittlevGL won’t see the ASCII font. In v5.3 the fonts can be concatenated to get a larger characters set. The built-in fonts are concatenated like:
font_dejavu_20 -> font_dejavu_20_latin_sup -> font_dejavu_20_cyrillic -> font_symbol_20.

If you use font_dejavu_20 LittlevGL will see all the added fonts too. However, if you use font_dejavu_20_cyrillic only Cyrillic and symbol font will be visible.

Read more about it here:

If you still want to use ASCII characters I see no point to use the Cyrillic font as default.

In v6.0 it will more straightforward. You will have only one font file which can contain ASCII, Cyrillic and symbols too.