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

Better case for Script #153

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Better case for Script #153

merged 2 commits into from
Apr 2, 2024

Conversation

benoitkugler
Copy link
Contributor

As @dominikh noticed, we currently use an odd convention for the binary representation of Script. I'm not sure what my heuristic was, but it seems simply better to adopt the general title-case convention (Arab, not arab).

The changes has few impact on the code, since we use constants anyway. However, the cache version number of fontscan has to be bumped since the current cache stores the scripts with the lowercase convention.

Closes #152

Copy link
Member

@whereswaldon whereswaldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dominikh
Copy link
Contributor

Maybe your heuristic was that if we don't know how to map the script to an OpenType tag, there's a small chance that the lowercase BCP 47 script tag is a valid OpenType tag?

@hajimehoshi
Copy link
Contributor

This is a good change, as Ebitengine cared about go-text's behavior (https://github.com/hajimehoshi/ebiten/blob/caecd81f4e9c2f8b3c7224956fc65538220b18aa/text/v2/gotext.go#L269-L272), and ISO 15924 says this is case-insensitive.

@benoitkugler benoitkugler merged commit ced1d68 into main Apr 2, 2024
20 checks passed
@benoitkugler benoitkugler deleted the scripts branch April 2, 2024 18:13
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.

[language] Better script casing
5 participants