I am facing a persistent issue when exporting my patterns to DXF formats (Standard R10/R12 and AAMA) using Seamly2D version 2026.3.2.214. I am sending these files via email to a production facility that uses Audaces CAD, and I also use Inkscape and Style3D to preview and test the files.
Here are the two main issues I am experiencing:
Corrupted Text Suffix: Every time I export to standard DXF, a string of strange characters (%&?_?&%) is automatically appended to the end of every single line of text or label. This happens regardless of whether I use uppercase letters, avoid accents/special characters, or change the software interface language.
Broken Font Scaling in AAMA: When exporting to DXF AAMA, the text suffix disappears, but the text scaling completely breaks. In smaller pattern pieces, the text is somewhat legible, but in larger pieces (like a large blouse or pants), the text becomes tiny, blurry, distorted, and out of place. It seems the font size scales dynamically and incorrectly based on the pattern bounding box.
What I have already tried (none of these worked):
Exporting directly from the “Piece Mode” instead of Layout.
Checking and unchecking “Export text as paths” (when activated, the text turns into unreadable “smudges” or heavy vector blobs in the receiving CAD).
Setting text alignment to “Baseline Left”.
Modifying the “Additional Font Size” inside the label editor (it locks at 25 and does not change the actual exported text size at all).
Manually setting fixed width and height dimensions (e.g., 15cm x 10cm) for the labels to force a constant bounding box, but the text still shrinks incorrectly in larger pieces.
Removing all line-break periods (.) and trying different formatting.
Manual cleaning in Inkscape or Audaces is not a viable option for my workflow due to the huge volume of patterns I generate daily.
Is there a known bug in the 2026 library regarding string control tags or text blocks? How can I force the DXF AAMA exporter to hardcode a static font size in millimeters that remains uniform across both small and large pieces?
I did not write the export code, but I’ve been looking into the issue trying to unravel what’s going on. So far what I have been able to figure out is that the dxf engine that Seamly’s dxf export is based on exports text at a fixed height. Changing any of the parameters in the labels has no effect on font size in the exports.
I’m looking to see if i can find a quick solution to export the correct font sizes… If I can - great… if not - it may be a while before I can address the issue.
Ok. I’ve got it more or less figured out. I had to plow through code with poorly named routines so it was hard to wrap my head around the export engine.
So I’ve already figured how to set the font size in the dxf, I just have to rewrite those routines to loop and set the text size in each TEXT block to the height of each line of text in the labels… instead of the fixed height of 2.5:
Discovered a bug with the position of the Pattern label text. Currently the DXF export is placing the Pattern label text relative to the bottom left corner of the piece, rather than the Pattern label.
Ok here’s the deal… I can probably do a quick fix to have the DFX export the labels with the correct font sizing. What I don’t want to do right now is get sucked into fixing all the other issues associated with exporting the labels correctly. Such as this senario:
Currently the export does not handle pattern pieces with labels rotated, or where a pattern piece is flipped along with any label text. No Bueno. It also does not handle the text alignment… everything is automatically left justified. Not to mention dealing with any compatibilty issues… For ex: The DXF R11 / R12 format is 34 years old!
This is how Archicad deals with it: Labels are borken into “single text” with text height of 0,1 mm. Here is the drawing in the scale of 1:100, hence you are able to see the text.
CAD programs always “interpret” text, as it is either scaled or not scaled. Often you can do this while importing. And I guess labels are exported/imported as “blocks”, that means single lines texts that will not behave nice when chaning font size.
@Douglas where can one change the size of the font in labels, all I have found is “additional font size”
The scaling depends on the export format and the app importing. R11 / R 12 has no units… so the default size of 2.5 that Seamly exports as can be 2.5mm, 2.5cm. 2.5inches, 2.5 feet… 2.5miles. So you have to know what units the pattern were drafted in and set the CAD app to the same units.
That said… currently Seamly just exports at:
static const qreal AAMATextHeight = 2.5;
For any line of text.
Each line of text is contained in a separate TEXT entiity block… and can have it’s own height. Seamly exports the TEXT blocks with a height of 2.5 that is set. What I aim to fix is setting the height for each line. To do so though entails having to extract each piece’s label’s TextManager, parse that to get the string and font metric, convert the font metric to the unit height, then write the TEXT block with the string and height.
Since I just hand edited the height and didn’t adjust the offset position… is the reason why there is the large space between the 1st and 2nd line.
Also since a R11 / R12 DXF (which is what I’ve been using) does not contain font data, only the string, it’s the importing app that creates the text using a “single stroke font” to render the text.
OMG. DXF and the libdrw lib are just archaic. Trying to get text to scale, space, and position properly is nightmare on every street. But… TADA! Almost there.
Yes, I know. I think units came very late into the CAD software, in classic Autocad they are still just optional. I was more replying to the OP that according to my experience it’s very hard to have an export- import that would work across different software. We were always using export and import profiles to streamline process.
Btw, I didn’t check, how the groups and different categories are exported from Seamly2D. My logic would be that:
“piece_1” >>> "group_!
categories like “seamline” “cutline” “labels” “notches” >>> “layer_seamline” “layer_cutline” …
I haven’t looked at the over all export format… but the DXF export writes a single Pattern Label, and then each piece is written as a block with it’s constituent parts in the approriate layer *:
I’m choosing to not implement the bold and italics styles for several reasons. 1) It means a font has to be defined for the export. 2) Bold is not used by single stroke fonts anyways.
What we need to do is have the DXF export properly handle the “Text as Paths” where the use of bold and italics makes more sense. This can be handled as a future update. I just wanted to fix the obvious issues with exporting the label TEXT. Now that I have the Piece label basically figured out I’ll apply the same changes to the Pattern label, and then get back to my regularly scheduled program…ming.
By left aligning the text lines you can now see what it’s doing… it’s lining the text to the left edge of the label bounding box. Hmmm. Each line is probably going to need to transform it’s starting baseline position, because unlike the graphic items in Piece mode we can’t just rotate the whole parent label.
// Project both horizontal tracking and vertical line spacing using the text angle
// In screen space: X moves right with cos, down with sin
// Y moves right with -sin, down with cos
qreal screen_x = left_start_pos.x() + (horizontal_dist * cos_a) + (verticalOffset * sin_a);
qreal screen_y = left_start_pos.y() - (horizontal_dist * sin_a) + (verticalOffset * cos_a);