- Notifications
You must be signed in to change notification settings - Fork10
Add method to return ISO15924 tag asu32#24
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: Nico Burns <nico@nicoburns.com>
src/lib.rs Outdated
| Self::inner_from_short_name(input) | ||
| } | ||
| /// The 4-byte iso15924 tag as a `u32` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: document as big-endian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: document as big-endian?
Might be a stupid question, but doesn'tu32::from_be_bytes convert to a native endian u32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hmm... yeah I think so. Perhaps this API ought return[u8; 4] to avoid ambiguity.
Signed-off-by: Nico Burns <nico@nicoburns.com>
1ad9b49 intounicode-rs:masterUh oh!
There was an error while loading.Please reload this page.
nicoburns commentedAug 16, 2025
@Manishearth Any chance of a release with these changes? |
…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. Wespecial case `Script::Unknown` because the `short_name` method returnsempty 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#23EDIT: Andunicode-rs/unicode-script#24 whichwould allow us to remove this method entirely.Signed-off-by: Nico Burns <nico@nicoburns.com>
…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. Wespecial case `Script::Unknown` because the `short_name` method returnsempty 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#23EDIT: Andunicode-rs/unicode-script#24 whichwould allow us to remove this method entirely.Signed-off-by: Nico Burns <nico@nicoburns.com>
Uh oh!
There was an error while loading.Please reload this page.
The
short_nameis always 4 ascii bytes, so it's convenient to be able to access it as au32.