Skip to content
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

Emojis break boxes [bug] #422

Open
Kycermann opened this issue May 22, 2022 · 7 comments
Open

Emojis break boxes [bug] #422

Kycermann opened this issue May 22, 2022 · 7 comments

Comments

@Kycermann
Copy link

Emojis seem to have double (?) the width of normal characters. This isn't accounted for in a box when using .pushLine.

β”‚Test 🐒                        β”‚
β”‚                              β”‚ 
β”‚                              β”‚                                                
β”‚                              β”‚                                                
@asnewman
Copy link

@Kycermann some emojis have two character lengths. You can see this by doing "🐒".length (output would be 2)

@Kycermann
Copy link
Author

That's true but they shouldn't distort the Blessed boxes they're in and at the moment they do

@p0ut
Copy link

p0ut commented Feb 11, 2023

@Kycermann This bug has been finally patched in a fork by kenan.
here

@Kycermann
Copy link
Author

@p0ut awesome, seems like here doesn't have a link though

@p0ut
Copy link

p0ut commented Feb 13, 2023

@Kycermann Apologies, https://github.com/kenan238/reblessed

@p0ut
Copy link

p0ut commented Feb 22, 2023

@Kycermann So just a quick update so I don't mislead you, both myself and kenan are looking into the emoji issue. It is caused by the library not being able to detect the width of emoji's. Initially, we managed to 'semi-patch' such characters, however it still occurs on certain emoji's.

It seems that most character ranges are hard coded. We are doing our best to try to find a sufficient fix for this and I will keep you updated here.

@Kycermann
Copy link
Author

@p0ut cheers, I appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants