以AliOS-Things\app\example\dk\dk_gui\sensor_display.c为例。
添加和修改代码,以默认utf-8编码格式保存:
LV_FONT_DECLARE(hanSansCN_3500_24);
static lv_style_t style5;
lv_style_copy(&style5, &lv_style_plain);
style5.text.font = &hanSansCN_3500_24;
lv_label_set_style(label5,&style5);
lv_label_set_text(label5, "温度(摄氏)");
littlevGL字体位于:
AliOS-Things\3rdparty\experimental\gui\littlevGL\lvgl\lv_misc\lv_fonts