svgbob icon indicating copy to clipboard operation
svgbob copied to clipboard

Mishandling of emoji character size

Open dmayle opened this issue 5 years ago • 5 comments
trafficstars

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

dmayle avatar Jul 08 '20 16:07 dmayle

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 :
!                    :
'~~~~~~~~~~~~~~~~~~~~'

ivanceras avatar Jul 11 '20 00:07 ivanceras

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

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

dmayle avatar Jul 11 '20 14:07 dmayle

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

dmayle avatar Jul 11 '20 14:07 dmayle

I see, it looks like a case of width.

ivanceras avatar Jul 12 '20 02:07 ivanceras

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" :
'~~~~~~~~~~~~~~~~~~~~~'

ivanceras avatar Aug 16 '21 18:08 ivanceras