Separate bundled LVGL fonts into external LGFX_Fonts (avoid upstream LVGL conflicts)#198
Merged
Merged
Conversation
…eam LVGL The in-tree LVGL font support (LVGLfont, lv_font_t, lv_font_montserrat_*, lvgl.h, lv_font/ parser, lv_conf_internal.h) shares symbol and header names with the upstream LVGL library, which broke builds that use LVGL directly. External LVGL fonts are now provided by the separate LGFX_Fonts component (tobozo/LGFX_Fonts), which exposes the same fonts under lgfx_lv_* renamed symbols so they no longer collide with upstream LVGL. The ft_lvgl enum and the BFFfont runtime-load path (loadFont(..., ft_lvgl)) are kept intact. Mirrors the rollback done in LovyanGFX. Co-authored-by: tobozo <tobozo@users.noreply.github.com>
…onts The bundled LVGL font symbols were removed, so the pre-built-font path now goes through the LGFX_Fonts component (fonts::lvFontMontserrat*). A M5GFX_LVGL_INTERNAL_H guard keeps the example working against both old (bundled) and new (delegated) M5GFX. The runtime BFF loadFont(..., ft_lvgl) path is unchanged. Drops the LVGL-format montserrat_16.c user-font sample (its lv_font_t type no longer applies).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The in-tree LVGL font support (
lv_font_t,lv_font_montserrat_*,lvgl.h, thelv_font/parser) shares symbol and header names with the upstream LVGL library. When a project uses LVGL directly alongside M5GFX, this causes link-timemultiple definitionerrors (e.g.lv_font_montserrat_14,lv_font_get_bitmap_fmt_txt), breaking the build.Change
Remove the bundled LVGL font implementation. External LVGL fonts are now provided by the separate LGFX_Fonts component (https://github.com/tobozo/LGFX_Fonts), which exposes the same fonts under renamed symbols (
lgfx_lv_*/fonts::lvFontMontserrat*) so they no longer collide with upstream LVGL.Kept intact:
ft_lvglenum valueloadFont(..., ft_lvgl)path (handled asBFFfont, which does not collide with LVGL)examples/Basic/LvglFontis rewritten to use LGFX_Fonts (fonts::lvFontMontserrat*) with aM5GFX_LVGL_INTERNAL_Hguard so it keeps working against both old (bundled) and new (delegated) M5GFX.This mirrors the same rollback already done in LovyanGFX.
Verification (PlatformIO, esp32)
Compatibility note
Compile-time font references change from
fonts::lv_font_montserrat_*tofonts::lvFontMontserrat*(provided by the LGFX_Fonts component). The runtime BFFloadFont(..., ft_lvgl)path is unchanged.