Fabric.js: Fabric 2.0 : Space removed by toSVG in multiple style text

Created on 21 Jul 2017  Â·  19Comments  Â·  Source: fabricjs/fabric.js

Version

2.0 beta 3

Test Case

http://jsfiddle.net/S9sLu/1836/

Steps to reproduce

Select the word "world" hit ctrl-b to make it bold.
Hit btn "export SVG"

Expected Behavior

See the sentence "Hello world man" with all the right space.
In fabric 1.7.15 it's ok.
screen shot 2017-07-21 at 15 07 49

Actual Behavior

We wee "Hello worldman"
screen shot 2017-07-21 at 15 07 21

bug itext

Most helpful comment

Fixed! I m making a beta4 today fixing a bit of things

All 19 comments

Fixed! I m making a beta4 today fixing a bit of things

Thanks that was awesomely fast!

It seems this bug is back in beta 6 in Safari ?

Can you paste here a full svg i can try in safari?

Is this ok? Do you see the bug?
```


Created with Fabric.js 2.0.0-beta6




world



i ll try to open it in safari. if safari does not support the whitespace
attribute the other way is swapping spaces with non breakable spaces but i
would be sad to see safari so dumb

On Aug 31, 2017 23:57, "Blob" notifications@github.com wrote:

Is this ok? Do you see the bug?



Created with Fabric.js 2.0.0-beta6




world



—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/kangax/fabric.js/issues/4116#issuecomment-326431469,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABI4QLAJaXnsddiVFGymHO4CR6P9bvgEks5sdyw3gaJpZM4OfYeF
.

Shouldn't we reopen this ticket? Did you find if the bug come from safari or fabric? :-)

did not open safari yet.

Looks like safari is ok if we put the style white-space to each tspan.
image

okay cool, so you think it could be "easy" to fix?

yes it is.

Hi,
I am facing the same issue in 1.7.9. Please refer attached image for SVG and try to open it with browser and image viewer and see the difference.

Thank You.

@nitin-bc we cannot take care of differences between browser and image-viewer. Only fabricjs related issue or svg non conformities.

Yes, I can understand your concern and I am not asking to compare them both. I just want to convey you that space is being removed while generating the SVG image.

Hope you are getting me.

Hi @asturur, would you please update me on this if possible?

Hi Everyone,

Is there any update on this for me? It would be great if someone can help me out as soon as possible.

Thank You.

You are using 1.7.9 and not latest 1.7.22 and we do not have a reproducible case for it. We can t really help in this way

I have used the latest one and seems working fine. Thank you. But in this case for masking feature, I can't see the added image to the canvas, even I have set the "Objectcaching:false" already

Was this page helpful?
0 / 5 - 0 ratings

Related issues

semiadam picture semiadam  Â·  3Comments

eugene-g13 picture eugene-g13  Â·  3Comments

Vivek-KT picture Vivek-KT  Â·  3Comments

amancqlsys picture amancqlsys  Â·  5Comments

medialwerk picture medialwerk  Â·  5Comments