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

Proposal: Add TTF_GetScript to retreive the script to which unicode character belongs #351

Closed
j9hnny97 opened this issue Apr 3, 2024 · 1 comment

Comments

@j9hnny97
Copy link

j9hnny97 commented Apr 3, 2024

At the moment SDL_ttf provides TTF_SetFontScriptName, a Harfbuzz related function that allows a script to be set (for a specific font) to be used for text shaping.

This is useful as long as the client knows the origin of its texts, allowing him to simply set the script relative to his language. If this isn't the case how would he know what to script to use? And what would happen if there are different characters in his text, each one requiring different scripts?

Harfbuzz already provides a way to obtain the best script to be used by each character. This PR exposes this functionally with TTF_GetScript, allowing the client to deal with this issue however he desires, without compromising the current library implementation.

@j9hnny97
Copy link
Author

j9hnny97 commented Apr 3, 2024

#312

slouken added a commit to slouken/SDL_ttf that referenced this issue Sep 27, 2024
slouken added a commit to slouken/SDL_ttf that referenced this issue Sep 27, 2024
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

1 participant