ivanceras / svgbob

Convert your ascii diagram scribbles into happy little SVG
http://ivanceras.github.io/svgbob-editor/
Apache License 2.0
3.88k stars 109 forks source link

Cut off Text when using Quotes #79

Open mbarkhau opened 3 years ago

mbarkhau commented 3 years ago

When text is at the bottom or right hand side of the diagram, it can be cut off. The elements appear to be there, so I guess there is something that's messing up the viewBox or image size. The renderer uses 0.6.2 and I've replicated the issue on https://ivanceras.github.io/svgbob-editor/

   !         !
   !         !
   !         '
   '       "123"
"version"  "(6bits)"
"(4bits)"

https://mbarkhau.keybase.pub/asciigrid/#vvE;AOAOA;AAARCgCgAiGBuArDNhMNkGLRDSDTDLBLWHVGSHTHZGfGeGLgYGWDSGZGUgSHgeGUoE

ivanceras commented 3 years ago

This looks like a miscalculation on the widths for the generated svg when there are double quotes. Putting some characters on the right will display the whole svg image just fine.

   !         !
   !         !
   !         '
   '       "123"
"version"  "(6bits)" ---
"(4bits)"