Description
What MCU/Processor/Board and compiler are you using?
STM32F407 and IAR9.3 compiler
What LVGL version are you using?
V8.3.11
What do you want to achieve?
Better display of Chinese and English fonts in dot-matrix screens
What have you tried so far?
internal fonts like montserrat display poor.
only lv_font_unscii_16 and lv_font_unscii_8 is ok.but no more large px font.
export external ttf chinese fonts,display poor the same.
Code to reproduce
//This font code is generate by squareline
void ui_Screen5_screen_init(void)
{
ui_Screen5 = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Screen5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_TextArea2 = lv_textarea_create(ui_Screen5);
lv_obj_set_width(ui_TextArea2, 240);
lv_obj_set_height(ui_TextArea2, 160);
lv_textarea_set_text(ui_TextArea2,
"Small simsun 16px\n上海飞奥燃气设备有限公司\n1234564590\nabcdefghijklmnopqrstuvwxyz\nABCDEDGHIJKLMNOPQRSTUVWXYZ");
lv_textarea_set_placeholder_text(ui_TextArea2, "Placeholder...");
lv_obj_set_style_text_font(ui_TextArea2, &ui_font_smallSimSun16px, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Screen5, ui_event_Screen5, LV_EVENT_ALL, NULL);
}
void ui_Screen6_screen_init(void)
{
ui_Screen6 = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Screen6, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_TextArea3 = lv_textarea_create(ui_Screen6);
lv_obj_set_width(ui_TextArea3, 240);
lv_obj_set_height(ui_TextArea3, 160);
lv_textarea_set_text(ui_TextArea3, "Smallsimsun32\n上海飞奥燃气\n0123456abcded\nABCDEDGHIJKLM\n");
lv_textarea_set_placeholder_text(ui_TextArea3, "Placeholder...");
lv_obj_set_style_text_font(ui_TextArea3, &ui_font_smallSimSun32px, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Screen6, ui_event_Screen6, LV_EVENT_ALL, NULL);
}
void ui_Screen7_screen_init(void)
{
ui_Screen7 = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Screen7, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_TextArea4 = lv_textarea_create(ui_Screen7);
lv_obj_set_width(ui_TextArea4, 240);
lv_obj_set_height(ui_TextArea4, 160);
lv_textarea_set_text(ui_TextArea4, "1234564590\nabcdefghijklmnopqrstuvwxyz\nABCDEDGHIJKLMNOPQRSTUVWXYZ");
lv_textarea_set_placeholder_text(ui_TextArea4, "Placeholder...");
lv_obj_set_style_text_font(ui_TextArea4, &lv_font_montserrat_24, LV_PART_MAIN | LV_STATE_DEFAULT);
}
Screenshot and/or video
screen5:
screen6:
screen7: