Skip to content

Modify the format0 length limit. - #119

Open
lwang1997 wants to merge 1 commit into
lvgl:masterfrom
lwang1997:master
Open

lwang1997 wants to merge 1 commit into
lvgl:masterfrom
lwang1997:master

Conversation

@lwang1997

Copy link
Copy Markdown

Description

This Pull Request fixes a bug in the lv_font_conv tool where the list_length in LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL type cmap could exceed 255, causing memory allocation issues and incorrect character mapping. The issue was identified when using the symbols parameter, which led to the generation of a glyph_id_ofs_list with 256 elements.

Changes Made

  • Modified the cmap_split function to ensure that the character range length does not exceed 255.

Related Issue

Testing

  • Tested with various character ranges to ensure list_length does not exceed 255.
  • Verified that the generated font files have correct character mappings.

@kisvegabor

Copy link
Copy Markdown
Member

Thank you! Could you also update the test?

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.

2 participants