1import fs_driver 2# 3# Show mixed LTR, RTL and Chinese label 4# 5 6ltr_label = lv.label(lv.scr_act()) 7ltr_label.set_text("In modern terminology, a microcontroller is similar to a system on a chip (SoC).") 8# ltr_label.set_style_text_font(ltr_label, &lv_font_montserrat_16, 0); 9 10fs_drv = lv.fs_drv_t() 11fs_driver.fs_register(fs_drv, 'S') 12 13try: 14 ltr_label.set_style_text_font(ltr_label, lv.font_montserrat_16, 0) 15except: 16 font_montserrat_16 = lv.font_load("S:../../assets/font/montserrat-16.fnt") 17 ltr_label.set_style_text_font(font_montserrat_16, 0) 18 19ltr_label.set_width(310) 20ltr_label.align(lv.ALIGN.TOP_LEFT, 5, 5) 21 22rtl_label = lv.label(lv.scr_act()) 23rtl_label.set_text("מעבד, או בשמו המלא יחידת עיבוד מרכזית (באנגלית: CPU - Central Processing Unit).") 24rtl_label.set_style_base_dir(lv.BASE_DIR.RTL, 0) 25rtl_label.set_style_text_font(lv.font_dejavu_16_persian_hebrew, 0) 26rtl_label.set_width(310) 27rtl_label.align(lv.ALIGN.LEFT_MID, 5, 0) 28 29font_simsun_16_cjk = lv.font_load("S:../../assets/font/lv_font_simsun_16_cjk.fnt") 30 31cz_label = lv.label(lv.scr_act()) 32cz_label.set_style_text_font(font_simsun_16_cjk, 0) 33cz_label.set_text("嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。") 34cz_label.set_width(310) 35cz_label.align(lv.ALIGN.BOTTOM_LEFT, 5, -5) 36 37