wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.81k stars 798 forks source link

Some emojis appear to overlap each other #3320

Open YaelLee opened 1 year ago

YaelLee commented 1 year ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230205-215311-16d75c97

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Some emoji seems to overlap each other overlap

To Reproduce

No response

Configuration

no config

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 1 year ago

It's not really a bug. Some emoji characters (such as U+2708) are defined as having single-cell-width in a terminal/monospace context, but the glyph from the font is square.

Because font metrics are based on their height rather than width, it means that those single-cell glyphs can overflow horizontally.

Selecting a different emoji font may produce different results.

YaelLee commented 1 year ago

it means that those single-cell glyphs can overflow horizontally.

So wether the single-cell-width characters should be optimized? Or wether the font metrics should be based on both height and width?

And it seems that the emoji is still not aligned with text in Apple Color Emoji. In the CSS, the emojis displayed are lower than text's baseline, see screenshot: CSS_emoji_baseline And in Wezterm the emojis displayed are aligned with text's baseline wezterm_emoji_baseline

erf commented 1 year ago

It seems some emojis can overflow both horizontally and vertically like this flame heart emoji.

Screenshot 2023-10-13 at 22 43 29