-
Notifications
You must be signed in to change notification settings - Fork 92
Description
When generating multiple font sizes using the LVGL Font Converter, the output C files contain multiple instances of redefined symbols, causing compilation errors. Specifically, symbols such as glyph_bitmap, glyph_dsc, unicode_list_0, unicode_list_4, cmaps, kern_pair_glyph_ids, kern_pair_values, kern_pairs, cache, and font_dsc are being duplicated across different font files
This leads to errors like:
error: redefinition of 'const uint8_t glyph_bitmap []'
error: redefinition of 'const lv_font_fmt_txt_glyph_dsc_t glyph_dsc []'
...
It seems the generated files do not properly namespace or separate the font definitions, resulting in conflicts when multiple font sizes are included in the same project.
Steps to Reproduce:
Use the LVGL Font Converter to generate multiple font sizes (e.g., Roboto 14, 18, 24, 28).
Include all the generated .c files in an LVGL project.
Attempt to compile the project.
Expected Behavior:
Each font file should have unique identifiers or a proper namespacing system to avoid conflicts when using multiple font sizes in the same project.
Environment:
LVGL version: 8.4.0
Possible Solution:
Automatically prefix or namespace font-related symbols based on the font size or user input.
Provide an option in the font converter to specify a unique identifier per font.