skymakerolof / dxf

DXF parser for node/browser
https://www.npmjs.com/package/dxf
MIT License
335 stars 122 forks source link

render Mtext #95

Open 1207702931 opened 2 years ago

1207702931 commented 2 years ago

There are a lot of MTEXT and TEXT content in my file that need to be rendered, what should I do?

z3dev commented 2 years ago

@1207702931 probably the best choice would be use ADOBE products.

Text rendering requires FONTs, and rendering engines.

KamyarTaher commented 2 years ago

Hello, I need to render text also. I saw that the data returned by the helper gives also Text data like this: colorNumber : 7 layer : "1" rotation : 90 string : " 1300.0 " textHeight : 33.7143 type : "TEXT" x : -33.7143 y : 515.14282

Couldn't I simply render and add each text as SVG text? I don't understand what the limitations would be. Could you enlighten me a little more? (knowing that I don't need custom fonts)

gabriel-peruchi commented 1 year ago

Hello, I need to render text also. I saw that the data returned by the helper gives also Text data like this: colorNumber : 7 layer : "1" rotation : 90 string : " 1300.0 " textHeight : 33.7143 type : "TEXT" x : -33.7143 y : 515.14282

Couldn't I simply render and add each text as SVG text? I don't understand what the limitations would be. Could you enlighten me a little more? (knowing that I don't need custom fonts)

I have the same problem, did you manage to solve it?

KamyarTaher commented 1 year ago

Hello!

Sorry for the late response, I managed to get the text but I didn't need it anymore, so I didn't continue the development, so the code is not clean at all. Anyway if this can help you, here is my fork. I modified the code in this file to allow the text. https://github.com/KamyarTaher/dxfWText/blob/develop/src/toSVG.js