-
Notifications
You must be signed in to change notification settings - Fork 182
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
Grapheme clusters #838
Grapheme clusters #838
Conversation
In case a cross-platform terminal like WezTerm is used
Ok("iTerm.app") => GraphemeClusterMode::Unicode, | ||
Ok("WezTerm") => GraphemeClusterMode::Unicode, | ||
Err(std::env::VarError::NotPresent) => match std::env::var("TERM").as_deref() { | ||
Ok("xterm-kitty") => GraphemeClusterMode::NoZwj, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the rendering varies depending on the platform / font used by Kitty ?
Because, I am almost sure that I tested kitty on MacOS. I will double check.
And, on Windows, all seems wrong:
Alacritty ~ (TERM=xterm-256color)
contour ~ (TERMINAL_NAME=contour)
WezTerm ~
Windows Terminal ~
But anyway, thanks for your feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried changing the font for Kitty, but my understanding is that it just automatically use a fallback font for emojis if it is not present in the provided font.
I suspect that the issue I have observed does depend on the installed font, and I do not see how this could be handled 100% of the time. When testing in xfce4-terminal
, My guess is that the underlying terminal emulator (GNOME’s vte
) does something that prevent the combination of the separate emojis, regardless of the font. It is unclear whether that is intentional, but it does mean that the behavior stays consistent accross installations.
Anyway, having a bunch of empty space next to the character is not a terrible failure case. It is probably better than the original behavior where it was hard to know what you were even typing. So, probably a worthwile trade-off.
See #826