Make the text in Textarea bigger


I need to make my text in my TextArea become biggger

What MCU/Processor/Board and compiler are you using?

I use visual studio 2019 to simulate my application

What LVGL version are you using?

v 7.10

What do you want to achieve?

I need to make my text in my TextArea become biggger

What have you tried so far?

I have used style to do this but even I set the max font lv_font_montserrat_48 I see it still small

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:


    lv_style_set_radius(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
    lv_style_set_bg_opa(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_OPA_COVER);
    lv_style_set_bg_color(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_COLOR_WHITE);
    //lv_style_set_border_width(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 0);

    lv_style_set_pad_top(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
    lv_style_set_pad_bottom(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
    lv_style_set_pad_left(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
    lv_style_set_pad_right(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);

    lv_style_set_text_color(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_COLOR_BLACK);
    lv_style_set_text_font(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, &lv_font_montserrat_40);
    ta = lv_textarea_create(cont, NULL);
    lv_textarea_set_accepted_chars(ta, SINGAL_SPEED_ACCEPTED_CHARS);
    lv_textarea_set_one_line(ta, true);
    lv_obj_set_width(ta, SIGNAL_SPEED_WIDTH_SIZE);
    lv_textarea_set_cursor_hidden(ta, true);
    lv_textarea_set_text(ta, display_text);
    lv_obj_set_event_cb(ta, ta_event_cb);
    lv_obj_set_size(ta, 200, 300);
    lv_obj_add_style(ta, LV_TEXTAREA_PART_BG, &UISystemStyle.SignalSpeedStyle);

I’m looking forward to seeing your reply as soon as possible.
Best regards,

you can try this

Tks for reply. I think the problem comes from the textarea. I don’t know why but when I try lv_font_montserrat_40 or even lv_font_montserrat_48, the size seem not change at all.

i think you try with lager font size, i think it not problem of textarea, if can, you should be upload your img of display

this is my main screen. I want numbers at the center little Bigger

you need bigger font size, try with this

Sr, but what is TTF/WOFF file?? How can I get that???

The built-in fonts are here: