Page 2 of 2

Re: RichAnno scrambled on SVG export

Posted: Fri Feb 14, 2020 7:25 pm
by uwestoehr
wandererfan wrote: Fri Feb 14, 2020 6:34 pm At the moment, the choice is between scrambled rich text or plain text. Rich text to Svg isn't on the table.
I don't understand. I mean at least the text size, shape and decoration can be kept in SVG export.

For the frame, I sent you an example of how the SVG must look. What is the issue that such a SVG cannot be created? Maybe I can have a look and find a solution?

Re: RichAnno scrambled on SVG export

Posted: Sat Feb 15, 2020 12:41 pm
by wandererfan
uwestoehr wrote: Fri Feb 14, 2020 7:25 pm I don't understand. I mean at least the text size, shape and decoration can be kept in SVG export.

For the frame, I sent you an example of how the SVG must look. What is the issue that such a SVG cannot be created? Maybe I can have a look and find a solution?
We don't create the Svg. It comes from Qt functions. The Qt functions don't seem to handle the transformation of RichText in a QTextDocument to Svg in an export file very well.

One solution is to build the Svg ourselves, skip the RTAs when rendering for export, then insert our Svg in the post processing step. This is somewhat similar to how we handle Svg hatch patterns & Templates on export.

If you want to look into this, by all means go ahead.

Re: RichAnno scrambled on SVG export

Posted: Sat Feb 15, 2020 3:28 pm
by uwestoehr
wandererfan wrote: Sat Feb 15, 2020 12:41 pm We don't create the Svg. It comes from Qt functions. The Qt functions don't seem to handle the transformation of RichText in a QTextDocument to Svg in an export file very well.
I understand. However, can it really not at least keep the text size, font change and decorations? That's in my opinion the minimum we should provide. I mean we offer a rich text feature but you cannot use as such. That is unintuitive.

Re: RichAnno scrambled on SVG export

Posted: Sat Apr 04, 2020 11:36 pm
by s-light
just a idea:
if the generated html is included in the svg as foreignObject there would be no need to convert it... maybe positioning is a little tricky with this..
but the down side is that inkscape and all other apps that are expacting only real svg will not show anything -
so maybe also insert a raw text representation?
hm not really a great solution...