Description
The roller widget will not display correctly if I use lv_font_montserrat_20. The middle value is screwed up (the value in the blue square). If I change the default font to lv_font_montserrat_18, the middle value is correct. I have included 2 photos of the screen. The first one is for font_18 and the second one is with font_20. The font_18 is correct but the fontt_20 is incorrect.
What MCU/Processor/Board and compiler are you using?
Nucleo-H7A3ZI-Q
What LVGL version are you using?
Version 8.3
What do you want to achieve?
I want to use lv_font_montserrat_20 but for a roller that uses 31 items it won’t display the middle value correctly. Font_montserrat_18 works great.
What have you tried so far?
I have tried different sizes of font. 14, 16 and 18 work but 20 and 22 do not work properly
Code to reproduce
/**
* An infinite roller with the days of the month
*/
void lv_day_roller(void)
{
roller2 = lv_roller_create(lv_scr_act());
lv_roller_set_options(roller2,
"01\n02\n03\n04\n05\n06\n07\n08\n09\n"
"10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n"
"20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n"
"30\n31", LV_ROLLER_MODE_INFINITE);
lv_style_init(&style_shadow2);
lv_roller_set_visible_row_count(roller2, 5);
lv_obj_align(roller2, LV_ALIGN_CENTER, -100, 0);
lv_obj_add_event_cb(roller2, event_handlerDay, LV_EVENT_VALUE_CHANGED, NULL);
}
Thanks,
Richard