- Notifications
You must be signed in to change notification settings - Fork32
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Advait-M commentedApr 26, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 use Confirmed that the changes above help get the correct width of 2 for Was curious when we expect this change will be included as part of a release cc@Manishearth perhaps? We're currently on version And thanks a ton for working on this@Jules-Bertholet ! 🎉 |
Manishearth commentedApr 26, 2024
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 commentedApr 28, 2024
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. |
Uh oh!
There was an error while loading.Please reload this page.
#35 take 2.
UAX11 says:
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.