-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
bug in svg export of text, empty spaces are rendered. #4521
Comments
probably the new lines and tabs for svg formatting do not help. |
i do not really like it but first thing we should do is stop pretty formatting the svg in the text. |
is from when we inserted the white-space preserve, is a 2.0 thing |
Ah yes, the white-space preserve is for Safari compatibility right? |
is for keeping spaces between tspans, and multiple spaces that would be otherwise eaten by svg. if you write Svg stuff.... |
Version
2.0 (and all since forever I think :-))
Test Case
http://fabricjs.com/test/svg_export/text.html
Or any text exported as SVG
Steps to reproduce
Try select the text, you'll see a white space used for nothing.
This can be really problematic with fonts like
https://fonts.google.com/specimen/Zilla+Slab+Highlight
You clearly see a useless rectangle on top of everything :
And I saw in the svg code that the before the first there is some white spaces, if we remove these spaces, the rectangle disappear and you get a clean svg text rendered.
I hope you'll see how to fix this! :-)
Thanks!
The text was updated successfully, but these errors were encountered: