How do I change the size of LV SYMBOL

Important: posts that do not use this template will be ignored or closed.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the relevant part of the documentation. We will not respond in detail to posts where you haven’t read the relevant documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

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

STM32

What LVGL version are you using?

V7.0

What do you want to achieve?

change size.

What have you tried so far?

lv_obj_set_size();

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:

/*You code here*/

lv_obj_t * label = lv_label_create(lv_scr_act(),NULL);
lv_label_set_text(label,LV_STMBOL_WARNING);
lv_obj_set_size(label,30,30);

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

static lv_style_t style
lv_style_init(&style);
lv_style_set_text_font(&style,LV_STATE_DEFAULT,&lv_font_montserrat_28);

1 Like

As you’ve discovered, labels (by default) do not allow their size to be changed using the standard functions. This is because the default long mode controls the label’s size itself.

If you do want to customize the label’s size, you can choose a different mode (like LV_LABEL_LONG_CROP or LV_LABEL_LONG_BREAK).

Thank you very much,

You want to change the lable’s size ,right?
Not the SYMBOL size.

I am trying to change the SYMBOL size on this topic. I have multiple labels that contain some of the fontAwesome special characters (LV_SYMBOL_UP, LV_SYMBOL_DOWN, LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT) … I am using these as navigation indicators, but I am wanting to change the size of these symbols. Is this possible?