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

Mishandling of emoji character size #55

Open
dmayle opened this issue Jul 8, 2020 · 5 comments
Open

Mishandling of emoji character size #55

dmayle opened this issue Jul 8, 2020 · 5 comments
Labels

Comments

@dmayle
Copy link

dmayle commented Jul 8, 2020

svgbob has problems when using certain characters, notably multipoint emoji like the helmet with white cross:

.~~~~~~~~~~~~~~~~~~~~.
! ⛑️   Problem Emoji :
'~~~~~~~~~~~~~~~~~~~~'

The spacing gets out of whack, make the ascii drawing not mach up in line spacing with the output

@ivanceras
Copy link
Owner

You need to have at least 2 drawing characters next to each other in order to effectively infer the shape.
As of the current algorithm, the ! or : could be used in a text

.~~~~~~~~~~~~~~~~~~~~.
! ⛑️   Problem Emoji :
!                    :
'~~~~~~~~~~~~~~~~~~~~'

@dmayle
Copy link
Author

dmayle commented Jul 11, 2020

This might be a better example of the problem I'm describing:

.~~~~~~~~~~~~~~~~~~~~.
! ⛑️Problem Emoji    :
! ⛑️ Problem Emoji   :
! ⛑️  Problem Emoji  :
! ⛑️   Problem Emoji :
'~~~~~~~~~~~~~~~~~~~~'

@dmayle
Copy link
Author

dmayle commented Jul 11, 2020

I should also not that I'm using 0.4.1 which has even more problems than 0.5.0-alpha.3

@ivanceras ivanceras added the bug label Jul 12, 2020
@ivanceras
Copy link
Owner

I see, it looks like a case of width.

@ivanceras
Copy link
Owner

I'm not sure about the characteristic of this emoji, svg seems to render it wrong when alone.
However, when the emoji is together with the text, it would render just fine.
For the mean-time this can be improve with text-escaping.

.~~~~~~~~~~~~~~~~~~~~~.
! "⛑️Problem Emoji"    :
! "⛑️ Problem Emoji"   :
! "⛑️  Problem Emoji"  :
! "⛑️   Problem Emoji" :
'~~~~~~~~~~~~~~~~~~~~~'

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

No branches or pull requests

2 participants