fxsvgimage icon indicating copy to clipboard operation
fxsvgimage copied to clipboard

<tspan> elements not rendering correctly

Open jonestheguitar opened this issue 2 years ago • 4 comments

The following SVG doesn't seem to render correctly. In the browsers I've tried (e.g. Edge, Internet Explorer) it looks like this: tspan

But the JavaFX scene graph created by fxsvgimage looks like this: tspan(fxsvgimage)

It looks like a combination of problems - perhaps not handling whitespace collapse (see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xml:space) and also not positioning/styling tspan elements correctly (most of them are missing).

I'm new to fxsvgimage so it's possible I haven't set it up correctly but other SVG images seem fine.

jonestheguitar avatar May 27 '22 19:05 jonestheguitar

Hello, the image is a PNG in the issue, can you upload the original svg image?

hervegirod avatar May 28 '22 16:05 hervegirod

Done. Sorry for the confusion!

jonestheguitar avatar May 28 '22 16:05 jonestheguitar

Thanks!

hervegirod avatar May 28 '22 17:05 hervegirod

I looked at the way I parse text and tspan elements, and I have to change the way I parse these elements :)

hervegirod avatar May 29 '22 13:05 hervegirod