Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Treat emoji presentation sequences as fullwidth#35

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

Closed
Jules-Bertholet wants to merge13 commits intounicode-rs:masterfromJules-Bertholet:emoji-presentation
Closed

Treat emoji presentation sequences as fullwidth#35

Jules-Bertholet wants to merge13 commits intounicode-rs:masterfromJules-Bertholet:emoji-presentation

Conversation

@Jules-Bertholet
Copy link
Contributor

@Jules-BertholetJules-Bertholet commentedFeb 10, 2024
edited
Loading

UAX11 says:

[UTS51]emoji presentation sequences behave as though they wereEast Asian Wide, regardless of their assigned East_Asian_Width property value.

Lookup is done with a 2-level trie.

joseluis reacted with eyes emoji
@Jules-Bertholet
Copy link
ContributorAuthor

In terms ofUTS 51 conformance, with this PR, this crate will give the correct widths for:

However, it may overestimate (though never underestimate) the rendered widths of:

@Jules-Bertholet
Copy link
ContributorAuthor

Jules-Bertholet commentedFeb 14, 2024
edited
Loading

I've replaced the binary search with a better datastructure, and also added a section in the rustdoc documenting the full width rules.

@Jules-Bertholet
Copy link
ContributorAuthor

The not-yet-released Unicode 16 adds 8 new non-emoji standardized variation sequences that affect width:https://unicode.org/alloc/Pipeline.html#variation_sequences,https://www.unicode.org/L2/L2023/23212r-quotes-svs-proposal.pdf. In time, we'll need to support those as well.

@Jules-BertholetJules-Bertholet mentioned this pull requestApr 23, 2024
@Jules-Bertholet
Copy link
ContributorAuthor

This PR is bloated, I'm splitting it up.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ManishearthManishearthAwaiting requested review from Manishearth

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Jules-Bertholet@Manishearth

[8]ページ先頭

©2009-2025 Movatter.jp