-
Notifications
You must be signed in to change notification settings - Fork 3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangul / Multi grapheme input is broken #936
Comments
I asked on #rust and was pointed to these libraries:
Edit, it looks like these are good for displaying once you have the characters. Not so much for the actual input. |
Thanks for the issue! This may be an issue in Regarding input, unicode segmentation is relevant there, and so is unicode-width. harfbuzz is certainly a render-time tool though. And actually, we don't properly support multi-codepoint grapheme clusters yet; cells are limited to single code points for now. |
And it works similarly in iTerm? |
Yep! iTerm2 and Terminal.app work the same as that gif, and have no problem switching input sources. |
In that case, this sounds like a duplicate of #306. Generally speaking, full unicode support is a bit tricky since it requires changes to how cell data is stored in the grid. Our current implementation only supports having a single code point per cell (a Rust What's really needed to get this moving forward is someone who is familiar with these problems to propose an implementation for Alacritty. The really hard part is doing all of this and not leaving performance on the table. |
If I understand correctly, aside from certain archaic glyphs, Korean text may use precomposed Hangul Syllables code points, which use one code point per grapheme. Therefore, multi-code-point grapheme clusters are not required to display Korean text, though they might be used during input. Decomposed (multi-code-point) syllables can be converted to their precomposed (single-code-point) equivalents using the |
@mbrubeck that's really helpful! Given that it composes into single codepoints per grapheme, we may be able to support this without major architectural changes. On Linux, this is handled out-of-band with IMEs, but I don't think there's any equivalent for macOS. |
Korean characters are made up of at least two graphemes, max 3-4. Normal input waits for a space or the maximum graphemes before moving onto the next character.
Intended behavior: Typing ㄲ ㅗ ㄱ should produce 꼭, ㄷ ㅏ ㄹ ㄱ should produce 닭, etc.
Alacritty behavior: Typing ㄲ ㅗ ㄱ stays as the individual graphemes. It doesn't appear to enter the mode of character composition.
System: OSX
Tested with iTerm2, no issues there on my setup.
The text was updated successfully, but these errors were encountered: