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

Support emoji presentation sequences#41

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

Merged
Manishearth merged 1 commit intounicode-rs:masterfromJules-Bertholet:emoji-presentation
Apr 23, 2024
Merged

Support emoji presentation sequences#41

Manishearth merged 1 commit intounicode-rs:masterfromJules-Bertholet:emoji-presentation
Apr 23, 2024

Conversation

@Jules-Bertholet
Copy link
Contributor

@Jules-BertholetJules-Bertholet commentedApr 23, 2024
edited
Loading

#35 take 2.


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.


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:


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.

@ManishearthManishearth merged commit73f816e intounicode-rs:masterApr 23, 2024
@Jules-BertholetJules-Bertholet deleted the emoji-presentation branchApril 23, 2024 17:13
@Advait-M
Copy link

Advait-M commentedApr 26, 2024
edited
Loading

Hey 👋 ! I'm an engineer fromWarp.So awesome to see this landed just 3 days ago - I wasjust digging deep into a fish-relatedStarship prompt issue which ultimately led me to Emoji_Presentation with Unicode for the ☁️ glyph (and related glyphs), so this is a wild coincidence haha 🔥 (I openedfish-shell/fish-shell#10461 just yesterday!). We useunicode-width to help calculate widths within our terminal grid, so this will help a bunch (we gotta fix up our widths + rendering logic).

Confirmed that the changes above help get the correct width of 2 for\u{2601}\u{FE0F} which maps to ☁️ with Emoji_Presentation via variation selector (as opposed to the previous result of 1) 🙌 !

Was curious when we expect this change will be included as part of a release cc@Manishearth perhaps? We're currently on version0.1 which we can update to0.1.11 but I believe this change isn't in a release cut yet, which makes sense given recency. We can also temporarily point to a commit directly as well, though ideally we'd avoid that for production Warp 😅 - just wanted to get a sense of the usual release cadence/cycle here?

And thanks a ton for working on this@Jules-Bertholet ! 🎉

workingjubilee reacted with confused emoji

@Manishearth
Copy link
Member

Published 0.1.12

I will warn you though: UAX 11 is not, and will never be, 100% accurate for monospace terminal size computation. "monospace" is not a concept that consistently makes sense across Unicode, and crates making strong assumptions about that should rethink their model.

@Advait-M
Copy link

Published 0.1.12

I will warn you though: UAX 11 is not, and will never be, 100% accurate for monospace terminal size computation. "monospace" is not a concept that consistently makes sense across Unicode, and crates making strong assumptions about that should rethink their model.

Awesome, thanks!

Ah gotcha - ack, thanks for the note! Yeah, we'll definitely have some fallback behavior that ensures it's not a fully broken experience in any case.

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

Reviewers

@ManishearthManishearthManishearth approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Jules-Bertholet@Advait-M@Manishearth

[8]ページ先頭

©2009-2025 Movatter.jp