|
本帖最后由 piggy 于 2023-10-20 11:48 编辑
用LVGL 8.3的版本,LvglFontTool V0.4生成内部字体,label中添加换行符会显示一个口 , 生成外部字体显示则正常
static lv_style_t style;
lv_style_init(&style);
lv_style_set_text_letter_space(&style, 3);
///TEXT
extern lv_font_t simsun22_in;
if(common_label == NULL){
common_label = lv_label_create(lv_scr_act());
}
//lv_label_set_text(common_label, (char *)common_obj[index].words);
lv_label_set_text(common_label, (char *)"开开\n心心");
lv_obj_set_style_text_font(common_label, &simsun22_in, 0);
lv_obj_add_style(common_label, &style, 0);
lv_obj_align(common_label, LV_ALIGN_TOP_MID, 0, 8);
|
|