Repository navigation
Support emoji presentation sequences - #41
Conversation
|
Hey 👋 ! I'm an engineer from Warp. So awesome to see this landed just 3 days ago - I was just digging deep into a fish-related Starship 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 opened fish-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 ! 🎉 |
|
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. |
#35 take 2.
UAX11 says:
Lookup is done with a 2-level trie.
In terms of UTS 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.