SVG chart output as full paragraph objects instead of individual letters or single lines

Summary: Please consider altering the way chart text objects are created / formatted / saved in SVG files.

Details:

I spent the better part of this weekend editing the text objects within a fan chart saved as SVG. This was done so that I could then more easily modify the fonts for running some test on my new xTool F1 Ultra laser engraver. More on that at the bottom of the post.

First the request …

Right now, if you save a chart report (fan, pedigree, etc) as SVG, it does not group the text inside each box as a single paragraph. Instead there is a mixture of individual letters and lines of text.

See below, where I’ve opened a file in Inkscape and selected some text. Note, for example that “Diana Frances Spencer” is a single line of text, “b:” is a chunk unto itself, and the birthdate that follows it is a different chunk.

That makes for a tremendous headache when trying to collectively change fonts, clean up formatting and so forth.

I would like to have the option of grouping text as single blocks of objects. Such as this:

That reduces the number of objects, and makes it infinitely easier to manipulate them. A whimsical example: turning them backwards, rotating, changing the font and also the color.

inkscape_RDkrDPdoQT

Now, to the laser etching and practical example.

I recently purchased an xTool F1 Ultra laser engraver, with a notion towards side-gigging and hobby after retirement.

As part of learning how to use the machine, and being a genealogist too, I decided to see what happened when I tried to engrave my entire family fan chart onto metal, which is an F1U’s talent.

The work area of the F1U is slightly smaller than an ISO A4 sheet of paper. And the metal test article is a bronze sheet ~152mm x ~152mm (6"x6"). So the fan chart would need to be scaled down to fit in that small space.

My first test was just to import the RM SVG directly into the laser software, shrink it down, and engrave the chart into a soft drink can I cut open. Okolahoma Soda Co. root beer, which is yummy, if anyone cares.

The resulting fan chart line structure came out ok, but the text elements were just unreadable blobs.

I realized that I would need to find a font that would scale down smaller and still be legible. I did a font test grid I created in Inkscape, saved as SVG and imported into the laser software. I determined that Artifakt Element Thin at ~2 points would be the choice.

My phone camera is zoomed in and I was holding it with my hand, so the above shot is somewhat blurry. The physical plate, under magnification, is easier to see.

Rather than running through time-consuming cycles of running the RM report, checking the font, etc over and over, I decided to use the report output I already had, tweaking fonts, layouts, etc inside Inkscape.

That’s when I ran into the challenge that is the RM SVG output.

I ended up going through the entire fan chart, converting all the little objects into nice, easier-to-manipulate paragraphs. Then I was able to apply the Artifakt Element font easily to all text objects and adjust layouts as needed. During that process I also grouped the text elements by person generation. That made it easier to later on easily reduce the font size on the just outer edge generations to ~1.5 points.

The resulting fan chart SVG was then opened in the laser software and the fan chart test burn conducted. The pictures below shows the result. The full picture looks unreadable in the picture due to photographer shakiness.

The “75%” in the label, by the way, doesn’t refer to the descaling I did. I used 75% laser power moving a fairly leisurely 1250 millimeters pers second.

Under magnification everything is easy to read except a few spots in the bottom left corner where the laser focus wasn’t strong enough. See zoomed-in picture.

The manipulation of SVG objects would have required much less time and effort if RootsMagic saved chart data as SVG paragraph objects.

5 Likes

Always enjoy reading your posts. They are full of insight and innovation. You’re going to have a stimulating ‘retirement’ doing your own things.

I’m with you on the SVG objects grouping.

2 Likes

The Gemini AI synopsis that accompanies a cursory Google search:


The Delphi programming environment may be limiting in its .SVG capabilities versus the over 20 years of Inkscape development, but the AI snippet suggests that, perhaps, Place names shouldn’t need to be broken up into multiple text objects because wrapping can be forced within defined areas?

1 Like

@TomH Thank you Tom, that’s sweet of you to say. :hugs:

My re-formatting saga seems to suggest that.

Based on the screenshot you shared, I’d say that RM should change the programming logic to pump the text output for each chart box into a single element.

Within Inkscape, I can change formatting inside an element for only some text or all. That’s to say, I could choose to make the name bold, the dates italics and leave the other text regular. So I assume that formatting attributes can be nested within a single element.

My “take” on understanding that premise is that one continuous line of text, in a single element and forced to wrap within the defined area, would not necessarily allow for the proper delineation of name, birth, death, accompanying places and the centering of those wrapped stretches of text as descending successive pseudo lines.

See before and after screenshots below. Using Microsoft XmlNotepad I inspected two SVGs, one before I consolidated the text into paragraphs, the other after. In the before, each text object stands alone in the object tree. In the after, there’s a single text object that uses tspan sub-elements.

Before consolidation

After consolidation

1 Like

Very cool! Does RootsMagic already do or have the capability to do the explicit (d)X and (d)Y calculations to adjust for centering or aligning the tspan subsegments?

That I don’t know. Hopefully @rzamor1 is following this thread, is considering my feature request, and could answer your question.

I sure hope it can do it. I’d prefer the app do it rather than me go on another editing binge after re-generating a chart :laughing:.

Confirming request has been reported to development. This is a bit over my head so I can’t add to the discussion on all the charting capabilities.

2 Likes