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

Find in hash table, use correct value size #474

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

1bsyl
Copy link
Contributor

@1bsyl 1bsyl commented Jan 27, 2025

Hey @slouken
This fix a crash in lastest version. *** stack smashing detected ***: terminated
because the key have has to be a ptr size.

Besides, I tested with/without a hash-table for glyph_indice, and there is not difference in speed. So probably freetype FT_Get_Char_Index is already optimized and we need no glyph_indice table.

@1bsyl 1bsyl force-pushed the br_fix_valuesize branch 2 times, most recently from ee924ba to 77a9b5e Compare January 27, 2025 12:50
@1bsyl 1bsyl merged commit a886619 into libsdl-org:main Jan 27, 2025
5 checks passed
@slouken
Copy link
Collaborator

slouken commented Jan 27, 2025

Ah, thank you.

FT_Get_Char_Index() uses a binary search, which is probably fine on Latin-1 fonts but slow on asian fonts. We should probably benchmark it more later, but we can leave as-is for now.

@1bsyl 1bsyl deleted the br_fix_valuesize branch January 28, 2025 08:57
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