felixse / FluentTerminal

A Terminal Emulator based on UWP and web technologies.
GNU General Public License v3.0
9.21k stars 443 forks source link

Poor compatibility with Emoji #963

Open sober-orange opened 3 years ago

sober-orange commented 3 years ago

Sorry, my English is poor and my grammar may be incorrect. I hope you can understand the problem I want to express. I decorated my PowerShell with ohmyposh and used Emoji in ohmyposh. This can be displayed normally on Windows terminal, but not fluent terminal. I'm not sure if it's fluent terminal's problem. Thank you very much for developing such excellent software. It runs really fast. I like it very much. I hope its support for Emoji can be better. If possible, I hope fluent terminal can support disabling some profiles. For example, CMD and so on, because I don't need it.

Figure 1 4JWAzt.png

Figure 2 4JWeL8.png

Figure 3 4JWneS.png

my ohmyposh configure

hanskokx commented 3 years ago

I've seen this before, but the issue was more powershell related.  I see you're using bash, though.  So, let's start with some troubleshooting:

sober-orange commented 3 years ago

我以前见过这个,但这个问题更多地与 powershell 相关。不过,我看到您正在使用 bash。那么,让我们从一些故障排除开始: - 是否启用了 ConPty?- 你用的是什么字体?- 你能发布你的 .omp.json 吗?- 你能发布你的 Fluent Terminal 配置吗?(一定要删除任何个人信息) -  https://github.com/felixse/FluentTerminal/wiki/Command-Line-Arguments#settings [e8125e0e-36f0-4eac-98cd-c003afd3022c]

Thank you very much for your reply. I'm sorry I didn't seem to have a clear mind at that time. What I wanted to say was bash, not PowerShell. However, after I use the same ohmyposh theme configuration on PowerShell, fluent terminal still displays exceptions. I will reply to your reply in order.

  1. Yes,I enabled ConPty.
  2. CaskaydiaCove Nerd Font
  3. my.omp.json link
  4. my Fluent Terminal config link

Please let me thank you again for your reply. Thank you very much.😀

hanskokx commented 3 years ago

I have been able to replicate this issue. It also does not appear to be font-related.

image

hanskokx commented 3 years ago

I have discovered two separate issues:

1) The os segment requires the following to be added in the properties: "postfix": " \uE0B1", 2) The extra space is due to some incorrect rendering of emoji. (See: https://ohmyposh.dev/docs/faq#windows-terminal-unexpected-space-between-segmentstext)

image

hanskokx commented 3 years ago

@felixse It seems as though there are some lingering bugs in the character renderer. Is this an xterm.js issue?

image

hanskokx commented 3 years ago
pwsh.exe alacritty
Fluent Terminal Windows Terminal

image

sober-orange commented 3 years ago

I have discovered two separate issues:

  1. The os segment requires the following to be added in the properties: "postfix": " \uE0B1",
  2. The extra space is due to some incorrect rendering of emoji. (See: https://ohmyposh.dev/docs/faq#windows-terminal-unexpected-space-between-segmentstext)

image

The problem of the os segment can be solved by adding a space symbol. For example, my setting here is "postfix": " " . but Emoji I don't know what to do.

hanskokx commented 3 years ago

This might be related, but I'm not sure. https://github.com/xtermjs/xterm.js/pull/3236