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