RichAnno scrambled on SVG export

Discussions about the development of the TechDraw workbench
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

Re: RichAnno scrambled on SVG export

Post by uwestoehr » Fri Feb 14, 2020 7:25 pm

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?
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: RichAnno scrambled on SVG export

Post by wandererfan » Sat Feb 15, 2020 12:41 pm

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.
User avatar
uwestoehr
Posts: 1794
Joined: Sun Jan 27, 2019 3:21 am

Re: RichAnno scrambled on SVG export

Post by uwestoehr » Sat Feb 15, 2020 3:28 pm

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.
User avatar
s-light
Posts: 86
Joined: Thu Feb 12, 2015 11:39 am
Location: Germany, Hofheim am Taunus
Contact:

Re: RichAnno scrambled on SVG export

Post by s-light » Sat Apr 04, 2020 11:36 pm

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...
Post Reply

Who is online

Users browsing this forum: Haldar and 1 guest