Page 1 of 1

Dimension label invisible in SVG export

Posted: Thu Aug 08, 2019 7:41 am
by slcasner
I have reduced the DXF file from https://qcad.org/rsforum/viewtopic.php? ... 322#p24286 to provide a simplified example of one problem. In the attached dims.dxf file there are two non-exploded dimensions. If the drawing is exported as SVG with Preserve Geometry not set, as in dims-arial.svg, then the labels are not visible when the SVG is viewed in Firefox. Looking at the SVG file, I see that the text is rendered as a very long <path> of Cubic Bézier Curves. That <path> contains no style parameter to set the stroke or fill color.

If the SVG is exported with Preserve Geometry set, as in dims-preserve.svg, then the text is output as a <text> object instead. In this case the text is rendered in black rather than the blue color specified for the layer containing the dimensions.

I would prefer to have text output as <text> objects because it reduces the complexity of the SVG file. Perhaps that could be controlled by the Application Preferences - Graphics View - Render Text as Text option? Or a similar option as part of the SVG export configuration.

This is with QCAD-Pro 3.23.0 on MacOS 10.14.4.

Re: Dimension label invisible in SVG export

Posted: Sun Mar 14, 2021 9:35 pm
by ryancousins
I'm bumping up this old post because I just realized I had the same issues and I wanted to confirm this is still normal behavior and there didn't appear to be any response to slcasner's post.

If I export an SVG, my dimension text does not export unless I choose to "preserve geometry". From looking through the forum, it sounds like QCAD can not export raw text so in order for that to be output in the SVG it needs to be changed to geometry? Is that accurate? One of the posts https://qcad.org/rsforum/viewtopic.php? ... try#p29618 made it sound like it was a preference and you could export it as text if you wanted?

QCAD 3.26.1
Win10 Pro

Re: Dimension label invisible in SVG export

Posted: Mon Mar 15, 2021 5:38 am
by slcasner
I have not heard anything else on this topic, but I have not pressed the issue.

Re: Dimension label invisible in SVG export

Posted: Mon Mar 15, 2021 9:00 am
by andrew
ryancousins: The label is exported as text, but without style. It is present in SVG, but invisible in viewers.

Bug report at:
https://www.qcad.org/bugtracker/index.p ... sk_id=2207

Re: Dimension label invisible in SVG export

Posted: Mon Mar 15, 2021 9:27 am
by ryancousins
Thanks Andrew!