Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tiny_ttf): backport Tiny TTF to lvgl 8 #4727

Merged
merged 5 commits into from Nov 2, 2023

Conversation

niklasf
Copy link
Contributor

@niklasf niklasf commented Oct 30, 2023

Unlike FreeType, the API offered by sbtt supports obtaining glyph metrics without rendering a bitmap, which is much more efficient with lvgl's typical usage patterns. It also supports kerning.

It would be nice to have this in lvgl 8, too.

Backported in two commits, to make this reviewable. The first is a verbatim copy from lvgl 9. The second are small changes to make it work under lvgl 8:

  • Some renamed APIs
  • Cache API not available under lvgl 8. Use lv_lru, instead
  • Not rendering at a specific stride

@kisvegabor
Copy link
Member

Hey,

Thanks! Looks great, just please add a basic screenshot compare test too.

@niklasf
Copy link
Contributor Author

niklasf commented Nov 2, 2023

Done. The test suite actually uncovered a memory leak (I didn't realize the LRU cache doesn't take ownership of the keys, like it does for the values).

@kisvegabor
Copy link
Member

Cool, thank you!

@kisvegabor kisvegabor merged commit 2791d57 into lvgl:release/v8.3 Nov 2, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants