HASwitchPlate / openHASP

HomeAutomation Switchplate based on lvgl for ESP32
https://www.openhasp.com
MIT License
726 stars 185 forks source link

May I ask how to make the device support Simplified Chinese font display #657

Closed xiasi0 closed 8 months ago

xiasi0 commented 8 months ago

have successfully burned the English version of the firmware and it is working properly. I hope it can display Simplified Chinese font

fvanroie commented 8 months ago

You can if your device hardware supports PSram and has a large 16Mb flash to hold the font file. Upload a Truetype font, for example chinese.ttf and use the text_font parameter to select it:

screenshot

{"page":4,"id":1,"obj":"btn","x":5,"y":35,"w":90,"h":90,"radius":0,"value_str":"\uE769","text":"\n欢迎","toggle":true,"value_ofs_y":-24, "text_font": "chinese36"}
{"page":4,"id":250,"obj":"label","x":240,"y":150,"w":240,"align":"center","template":"祝您有个美好的一天!", "text_font": "chinese24"}