Change Gui Guider font size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Gui Guider font size

Jump to solution
1,676 Views
Johnny5
Contributor II

What is the proper #include for standard fonts in Gui Guider-1.8.1-GA?

This works in custom code.

    lv_obj_set_style_text_font(ui_Label_Timer, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);

But, changing font size results in a compilation failed.  This font has no issue in the UI editor.

    lv_obj_set_style_text_font(ui_Label_Timer, &lv_font_montserrat_24, LV_PART_MAIN | LV_STATE_DEFAULT);

0 Kudos
Reply
1 Solution
1,649 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Johnny5 

If you want to add lv_font_montserratMedium_12, 

Please declare in file gui_guider.h

Harry_Zhang_0-1734944098008.png

BR

Harry

View solution in original post

0 Kudos
Reply
1 Reply
1,650 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Johnny5 

If you want to add lv_font_montserratMedium_12, 

Please declare in file gui_guider.h

Harry_Zhang_0-1734944098008.png

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2018197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EChange%20Gui%20Guider%20font%20size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2018197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhat%20is%20the%20proper%20%23include%20for%20standard%20fonts%20in%20Gui%20Guider-1.8.1-GA%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EThis%20works%20in%20custom%20code.%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lv_obj_set_style_text_font(ui_Label_Timer%2C%20%26amp%3Blv_font_montserrat_12%2C%20LV_PART_MAIN%20%7C%20LV_STATE_DEFAULT)%3B%3C%2FP%3E%3CP%3EBut%2C%20changing%20font%20size%20results%20in%20a%20compilation%20failed.%26nbsp%3B%20This%20font%20has%20no%20issue%20in%20the%20UI%20editor.%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lv_obj_set_style_text_font(ui_Label_Timer%2C%20%26amp%3Blv_font_montserrat_24%2C%20LV_PART_MAIN%20%7C%20LV_STATE_DEFAULT)%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2018476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Change%20Gui%20Guider%20font%20size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2018476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244334%22%20target%3D%22_blank%22%3E%40Johnny5%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20add%26nbsp%3Blv_font_montserratMedium_12%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20declare%20in%20file%20gui_guider.h%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Harry_Zhang_0-1734944098008.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Harry_Zhang_0-1734944098008.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317039iC42DEF9809A4FD83%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Harry_Zhang_0-1734944098008.png%22%20alt%3D%22Harry_Zhang_0-1734944098008.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E