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

LVGL add support for TrueType fonts via FreeType library #12087

Merged
merged 1 commit into from
May 12, 2021

Conversation

s-hadinger
Copy link
Collaborator

Description:

Support for TrueType fonts is disabled by default and requires #define USE_LVGL_FREETYPE. It uses a default glyph cache size (in PSRAM) of 16KB that can be increased.

This uses the following libraries:

Note: this works better with large Flash (16MB) or SD Cards since TTF fonts typically are 100KB sized.

Note2: FreeType uses 24KB of stack which is beyond the standard 8KB stack. For this reason a secondary FreeRTOS task is created with 24KB of stack size and used when calling FreeType glyph rendering engine.

Example:

#- font playa.ttf -#
playa80 = lv.load_freetype_font("playa.ttf", 80, 0) #- font 'playa.ttf' in file-system, size 80, style plain -#
label.set_style_local_text_font(lv.OBJ_PART_MAIN, lv.STATE_DEFAULT, playa80)

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works on Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with core ESP32 V.1.0.6
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger s-hadinger merged commit e1af5f6 into arendst:development May 12, 2021
@s-hadinger s-hadinger deleted the lvgl_freetype branch January 6, 2025 14:09
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.

1 participant