Font line space, letter space is not working


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


What LVGL version are you using?


What do you want to achieve?

Ensure that lv_style_set_text_line_space() , lv_style_set_text_letter_space() , lv_obj_set_style_text_line_space() , and lv_obj_set_style_text_letter_space() work with the added font.

What have you tried so far?

I am trying to display text with line breaks on a label, as shown below.


However, when I enable an external font with lv_style_set_text_font, the line space and letter space settings stop working. The settings work fine with the default Montserrat font, but they fail when I switch to a different font.
Even though I set the space to 0, mysterious spaces still appear.

Font is Google Noto Sans.
Set the Bpp to 2bit. Using LVGL Online Converter.

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_obj_t* label = lv_label_create(screen_result__root);
    // lv_obj_add_style(label, &s_result_lable_style, 0);
        // lv_style_init(&s_result_lable_style);
    // lv_style_set_text_font(&s_result_lable_style, &noto_sans_jp_bold_2bit);
    // lv_style_set_text_line_space(&s_result_lable_style, 0);
    // lv_style_set_text_letter_space(&s_result_lable_style, 0);

    lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0);
    lv_obj_set_style_text_line_space(label, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_letter_space(label, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

Screenshot and/or video

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