The problem of parsing fonts from ttf files/Page lag

After parsing different ttf files in the code, it is found that different ttf files have different responses. Some of them are smooth, but some interfaces will be too laggy when loading labels. Why?

It could be due to memory constraints and the size of the TTF files being used. Larger or more complex fonts can require more processing and memory during rendering, which may cause noticeable lag when labels are created or updated.

Could you share more details about your setup, such as the hardware specifications and the sizes of the TTF files you are using? This would help in understanding the cause more accurately.

Thank you for your reply!
This is my definition of memory size macros.

/*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/
#define LV_MEM_SIZE (5 * 1024 * 1024U)          /*[bytes]*/

The available physical memory of my device is 235MB。
ttf: source-sans-pro V1.0xx——It runs smoothly when used.
ttf: roboto——No matter which version,It’s quite laggy to use.

Can you share the font files?

ttf.zip (128.8 KB)
Thank you for your reply! I have uploaded the two TTF files.

I just checked the fonts by loading them at runtime from the ttf files,
Each uses about 520 bytes of memory.

Did you also try converting the font and running it for comparison?

Output format C file