Xinyuan-LilyGO / TTGO_TWatch_Library

MIT License
890 stars 284 forks source link

s3 watch face broken. Need enable LV_USE_FONT_COMPRESSED. #225

Open panlina opened 8 months ago

panlina commented 8 months ago

Previously characters in watch face don't show up in s3 branch, and a recent commit fixed it by changing to normal fonts.

Seems this is due to lvgl font format. Current font files are generated with --bpp 3 while lvgl doc states that it only support bpp 1, 2, 4 and 8. I tried regenerating one of the fonts with --bpp 2 and the digits show up.

We can update all the fonts if we want to make the current watch face work again.

panlina commented 8 months ago

No. I tried again with lv_font_conv offline tool and the characters disappeared again. The real cause is the compression option. My previous fonts are generated with online tool. The online tool and offline tool have different default setup regarding compression. The offline tool will compress the font by default if you don't specify --no-compression option. Current fonts in repo are all compressed. So to use these fonts we have to enable the LV_USE_FONT_COMPRESSED switch in lv_conf.h. No changes are needed in font files.