gdsestimating / three-dxf

A dxf viewer for the browser using three.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First of all, thank you. I have another question. After it is converted into regular text, the text will be displayed as a question mark

wzjgzcc opened this issue · comments

First of all, thank you. I have another question. After it is converted into regular text, the text will be displayed as a question mark
NoNoHatchMtext.zip

My guess is that the font three.js is using does not support the characters in the DXF file. You will need to find a suitable font. See https://github.com/gdsestimating/three-dxf/blob/master/sample/index.js#L85-L93 for how to load a font.

我的猜测是three.js使用的字体不支持DXF文件中的字符。您将需要找到合适的字体。有关如何加载字体的信息,请参见https://github.com/gdsestimating/three-dxf/blob/master/sample/index.js#L85-L93。

Thank you. The point is: I can't tell what font it is. Is there any way to solve this problem or suggestion?

In the source code @bzuillsmith mentioned the font loaded is helvetiker_regular.
From the top of my head I think when I changed the font before I searched one containing the characters I needed on https://fonts.google.com and then transforming it in https://gero3.github.io/facetype.js.

In the source code @bzuillsmith mentioned the font loaded is helvetiker_regular.
From the top of my head I think when I changed the font before I searched one containing the characters I needed on https://fonts.google.com and then transforming it in https://gero3.github.io/facetype.js.

The default encoding of DXF is ANSI, while the default encoding of DXF parser is UTF-8. How to convert ANSI to UTF-8

If you can provide the new file with TEXT entities and ANSI encoding I can try to help you (please remove the non text objects it helps searching for them in the file).

If you can provide the new file with TEXT entities and ANSI encoding I can try to help you (please remove the non text objects it helps searching for them in the file).

Thanks!The problem has been found. It's caused by font. Textgeometry() is garbled in Chinese. Just import the font with Chinese, Fontloader(). Import Chinese font library

If you can provide the new file with TEXT entities and ANSI encoding I can try to help you (please remove the non text objects it helps searching for them in the file).

image
I'm trying to select a flat graphic, but I can't get info. Isn't it supported?