gnotclub / xst

st fork that uses Xresources and some pretty good patches
MIT License
537 stars 73 forks source link

Wide characters are cut off #27

Open cherryman opened 7 years ago

cherryman commented 7 years ago

2017-05-07-111957_467x206_scrot

Any way to fix this?

dab commented 5 years ago

any updates on this issue? thanks.

actionless commented 5 years ago

your issue report could be improved by providing font used, text string and expected result (in which terminal it works as expected)

mustaqimM commented 5 years ago

I also face the same problem, though I only use a unicode glyph in one place: image If I add 2 spaces to the place I'm defining it: zsh export ZSH_PLUGINS_ALIAS_TIPS_TEXT=$'\033[01;33m💡 ', then it outputs correctly.

image

On kitty it shows as: image

And on alacritty: image

It occurs with any font. With or without escape chars.

actionless commented 5 years ago

weird, i can't reproduce this:

echo _💡_

2019-07-12--1562941679_397x123_scrot

i recommend you trying with more different fonts, mb there is some correlation between the chosen font and reproducibility of this problem

mustaqimM commented 5 years ago

hmm, I've tried:

Iosevka
DejaVu Sans Mono
Noto Sans Mono
Liberation Mono
FreeMono
Monofur Nerd Font
Nimbus Mono L

And all require two spaces after the glyph to render correctly. What emoji font are you using? I have noto-fonts-emoji-20180810 & twemoji

image

actionless commented 5 years ago
  <family>monospace</family>
  <prefer>
   <family>Fantasque Sans Mono</family>
   <family>Emoji One Color</family>
</prefer>
actionless commented 5 years ago

but with different monospace fonts it also works, so i guess the problem is with emoji font, what it's not setting what chars should be double-width:

2019-07-12--1562951740_470x168_scrot

mustaqimM commented 5 years ago

I think there are 2 problems here: noto-fonts-emoji requires 2 spaces. twemoji(the successor to Emoji One) needs 1 space but only on st.

On alacritty and kitty, it shows correctly without a space. (I tried it with twemoji and font-symbola). But st needs the space. Presumably because it's placing a two cell width char in a single cell