Map Script::Unknown to Zzzz short name#23
Merged
Manishearth merged 1 commit intounicode-rs:masterfrom Aug 15, 2025
Merged
Conversation
This is specified in UAX#24 (https://www.unicode.org/reports/tr24/#Relation_To_ISO15924) And matches HarfBuzz's definition https://github.com/harfbuzz/harfbuzz/blob/0e6e18e74f31f4f3fd3817086b03490a24714888/src/hb-script-list.h#L240
github-merge-queue bot
pushed a commit
to servo/servo
that referenced
this pull request
Aug 18, 2025
…t for harfbuzz (#38704) Replaces a big match statement with a call to `unicode_script`'s `Script::short_name` method which has the same big match statement. We special case `Script::Unknown` because the `short_name` method returns empty string for that variant, but harfbuzz represents it with `Zzzz`. EDIT: `Zzzz` seems to be in the spec so I've sent a PR to `unicode_script` to use it: unicode-rs/unicode-script#23 EDIT: And unicode-rs/unicode-script#24 which would allow us to remove this method entirely. Signed-off-by: Nico Burns <nico@nicoburns.com>
PotatoCP
pushed a commit
to PotatoCP/servo
that referenced
this pull request
Aug 20, 2025
…t for harfbuzz (servo#38704) Replaces a big match statement with a call to `unicode_script`'s `Script::short_name` method which has the same big match statement. We special case `Script::Unknown` because the `short_name` method returns empty string for that variant, but harfbuzz represents it with `Zzzz`. EDIT: `Zzzz` seems to be in the spec so I've sent a PR to `unicode_script` to use it: unicode-rs/unicode-script#23 EDIT: And unicode-rs/unicode-script#24 which would allow us to remove this method entirely. Signed-off-by: Nico Burns <nico@nicoburns.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is specified in UAX#24 (https://www.unicode.org/reports/tr24/#Relation_To_ISO15924)
And matches HarfBuzz's definition https://github.com/harfbuzz/harfbuzz/blob/0e6e18e74f31f4f3fd3817086b03490a24714888/src/hb-script-list.h#L240