kenan238 / reblessed

A high-level terminal interface library for node.js.
MIT License
75 stars 9 forks source link

[Bug] Emoji's break boxes. #12

Open p0ut opened 1 year ago

p0ut commented 1 year ago

It seems that some emoji's have a tendency to break boxes. Something due to the length of the emoji not being detected.

| banana | | banana 🍌 |

kenan238 commented 1 year ago

Fixed it in the latest commits

kenan238 commented 1 year ago

Never mind, this is still an issue with some stubborn emojis

kenan238 commented 1 year ago

Apparently, this is not my fault. It's the font's

erictheswift commented 8 months ago

Can be called fonts fault, however it's how it works.

Emojis/country flags need special treatment when calculating string width.

You can consider using slice-ansi (however some cases are not yet handled even there https://github.com/chalk/slice-ansi/issues/35#issuecomment-1885346171) or string-width package for that.

kenan238 commented 4 months ago

I don't think it'd be worth the effort considering how little time I have for this project nowadays, I'll wait until summer rolls by so I can look into this