Description
I have a set of bitmap fonts that I’d like to use in an lvgl project. These fonts store the character data in a very simple uncompressed 1bpp format. Ex:
/*
* code=65, hex=0x41, ascii="A"
*/
0x06,0x00, /* 000001100000 */
0x06,0x00, /* 000001100000 */
0x0F,0x00, /* 000011110000 */
0x0F,0x00, /* 000011110000 */
0x0F,0x00, /* 000011110000 */
0x19,0x80, /* 000110011000 */
0x19,0x80, /* 000110011000 */
0x19,0x80, /* 000110011000 */
0x30,0xC0, /* 001100001100 */
0x3F,0xC0, /* 001111111100 */
0x3F,0xC0, /* 001111111100 */
0x60,0x60, /* 011000000110 */
0x60,0x60, /* 011000000110 */
0x60,0x60, /* 011000000110 */
0x00,0x00, /* 000000000000 */
0x00,0x00, /* 000000000000 */
And when I look at lvgl fonts files, I see that the character data is stored in a completely different way. Judging by the fact that each character takes up a different number of bytes, it looks to be packed in some way. Ex:
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0xff, 0xf3, 0xc0,
/* U+0022 "\"" */
0xcf, 0x3c, 0xf3, 0xcc,
/* U+0023 "#" */
0x36, 0x7f, 0xff, 0xe6, 0xc3, 0x67, 0xff, 0xfe,
0x6c, 0x36, 0x0,
I know that I could render the fonts I have myself simply enough, but I’m also using other fonts that are in the lvgl format and would really like to avoid adding complexity/rendering different types of fonts using different methods. So ideally I’d like to convert the fonts I have to lvgl format. Is this something that has been done so I can avoid reinventing a wheel? If not, where can I find details on how the lvgl font packs/stores the character data so that I can convert them?
What MCU/Processor/Board and compiler are you using?
NXP RT1064
MCUExpresso IDE
What LVGL version are you using?
7.8.1
What do you want to achieve?
Create lvgl compatible fonts from other bitmap fonts (not from TrueType/WOFF)