microsoft / microsoft/maker.js
Duplicate paths on single line font in DXF export
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 302
- Avg merge
- 21h 28m
- Merged PRs (30d)
- 5
Description
I'm using a single line font to create text objects which are then engraved on a CNC machine. I'm getting an issue where the paths of the font are duplicated in the exported DXF file.
I have two versions of the font. The first uses beziers as below


The second image above is a screen shot from a CAD application where I have offset the duplicate lines. You will see each individual bezier occurs twice in the file. I have also selected every other path in the duplicates which then appear red and you can see there are a lot more beziers than in the original font (i have tried experimenting with the bezier accuracy option but it doesn't seem to effect the output), this is a minor point but lead me to try using a version of the font which is just comprised of straight lines as below

Again each individual line is duplicated in the export as shown below however this time the straight lines match those of the font

The duplication is a big issue as when the DXF is imported into out toolpathing application it treats the duplicate lines as an object which needs to be closed and preventing us from then joining them together into a single line.
I think this duplication is a bug caused by single line fonts not being closed fills like more regular fonts.
As a side note I've also tried using captions instead but we get problems where these are not parsed correctly in the toolpathing application and get strangely rotated. We can't also measure the size and then position captions as accurately as we can text objects so we really want to try and fix this duplication. If we manually open up the DXF and remove the duplicates and resave it is imported perfectly into the tool pathing application as a series of open vectors which can then be joined together.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the duplicate paths through the DXF export entry point with the two single-line font variants described in the issue, including the bezier accuracy option. Compare the exported DXF with the source text paths; done means each path appears once and remains importable as open vectors for joining in the toolpathing application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100