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

When using this tool to generate a CJK font library, I encountered an issue that causes an error when loading the font. #118

Open
lwang1997 opened this issue Aug 1, 2024 · 2 comments

Comments

@lwang1997
Copy link

1722506480079
1722506411935
In the code, the ids_size variable is of type uint8_t. However, the font library generated by the tool has a list_length of 256, causing ids_size to wrap around to 0. This results in lv_mem_alloc failing to allocate RAM.
[
HSBR26.txt
](url)

@lwang1997
Copy link
Author

image
In the cmap_split function, can these two conditions be changed to less than 255? Since path.end is incremented by 1, if all_codepoints[i] - all_codepoints[j] equals 255, it satisfies the condition of being less than 256. After path.end + 1, it becomes 256. Could this be the reason why list_length exceeds 255?

@lwang1997 lwang1997 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@lwang1997 lwang1997 reopened this Aug 3, 2024
@kisvegabor
Copy link
Member

I'm not the developer of the font converter, but it seems like an oversight to me. Can you send a pull request to fix it?

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

No branches or pull requests

2 participants