How can I use TTF font for every size.
At now, lvgl is using bitmap font, and it take many memory for each font size.
For ex, one Roboto font, but if the size just is different, corresponding size font c array is generated, Roboto_12, Roboto_14, Roboto_16,…
Below site talked about custom font, and it is released in v5.1, but I cann’t find any example or function like get_ttf_bitmap in lvgl library.
I can imagine that,
Save TTF into flash
When need to draw a font size, read TTF and generate font size bitmap in RAM
Use generated bitmap, then delete after drawn.
My imagine may not be impossible, but please help if you have any idea + example code.
It sounds great!, but freetype is built on linux.
I’m using MCUPresso on windows for rtos application.
Could you guide me how to use freetype on windows and port lib into rtos?
@kisvegabor
LVGL is good for small hardware which ttf is saved on its memory (not file like linux or windows)
Could you create a library that can read head memory and generate bitmap font?
( refer to FT_New_Memory_Face )
I ported Freetype into my project in my way.
But when run FT_Load_Glyph(), I got an error called “Out Of Memory”
Maybe not enough RAM for generate bitmap.