acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_label_3.c (1471B)
1 #include "../../lv_examples.h" 2 #if LV_USE_LABEL && LV_BUILD_EXAMPLES && LV_FONT_DEJAVU_16_PERSIAN_HEBREW && LV_FONT_SIMSUN_16_CJK && LV_USE_BIDI 3 4 /** 5 * Show mixed LTR, RTL and Chinese label 6 */ 7 void lv_example_label_3(void) 8 { 9 lv_obj_t * ltr_label = lv_label_create(lv_scr_act()); 10 lv_label_set_text(ltr_label, "In modern terminology, a microcontroller is similar to a system on a chip (SoC)."); 11 lv_obj_set_style_text_font(ltr_label, &lv_font_montserrat_16, 0); 12 lv_obj_set_width(ltr_label, 310); 13 lv_obj_align(ltr_label, LV_ALIGN_TOP_LEFT, 5, 5); 14 15 lv_obj_t * rtl_label = lv_label_create(lv_scr_act()); 16 lv_label_set_text(rtl_label, 17 "מעבד, או בשמו המלא יחידת עיבוד מרכזית (באנגלית: CPU - Central Processing Unit)."); 18 lv_obj_set_style_base_dir(rtl_label, LV_BASE_DIR_RTL, 0); 19 lv_obj_set_style_text_font(rtl_label, &lv_font_dejavu_16_persian_hebrew, 0); 20 lv_obj_set_width(rtl_label, 310); 21 lv_obj_align(rtl_label, LV_ALIGN_LEFT_MID, 5, 0); 22 23 lv_obj_t * cz_label = lv_label_create(lv_scr_act()); 24 lv_label_set_text(cz_label, 25 "嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。"); 26 lv_obj_set_style_text_font(cz_label, &lv_font_simsun_16_cjk, 0); 27 lv_obj_set_width(cz_label, 310); 28 lv_obj_align(cz_label, LV_ALIGN_BOTTOM_LEFT, 5, -5); 29 } 30 31 #endif