refactor(tiny_fft): refactor tiny_ttf cache with updated improvements (#6441)

Co-authored-by: Benign X <1341398182@qq.com>
Co-authored-by: Visa Harvey <visa.harvey@semel.fi>
This commit is contained in:
Visa Harvey
2024-07-11 09:23:20 +03:00
committed by GitHub
parent 3ac0a96cca
commit 730a3bd76f
17 changed files with 331 additions and 124 deletions

View File

@@ -29,11 +29,14 @@ entire time the font is being used.
After a font is created, you can change the font size in pixels by using
:cpp:expr:`lv_tiny_ttf_set_size(font, font_size)`.
By default, a font will use up to 4KB of cache to speed up rendering
glyphs. This maximum can be changed by using
:cpp:expr:`lv_tiny_ttf_create_data_ex(data, data_size, font_size, cache_size)`
or :cpp:expr:`lv_tiny_ttf_create_file_ex(path, font_size, cache_size)` (when
available). The cache size is indicated in bytes.
By default, a font will cache data for upto 256 glyphs elements to speed up rendering.
This maximum can be changed by using
:cpp:expr:`lv_tiny_ttf_create_data_ex(data, data_size, font_size, kerning, cache_size, )`
or :cpp:expr:`lv_tiny_ttf_create_file_ex(path, font_size, kerning, cache_size)` (when
available). The cache size is indicated in number of entries. Kerning is whether to allow
if supported, or disable.
.. _tiny_ttf_example: