Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文字体乱码问题 #143

Open
woshichen62 opened this issue Oct 28, 2024 · 7 comments
Open

中文字体乱码问题 #143

woshichen62 opened this issue Oct 28, 2024 · 7 comments

Comments

@woshichen62
Copy link

image
上传了带有中文字体的dxf文件后,出现字体问题,我看到#85的Issues有相关的问题,需要设置编码格式为unicode,但是不知道是如何解决的,请指导以下,谢谢

@yanzexuan1
Copy link
Collaborator

const modelCfg: ModelConfig = {
    modelId: "id_0",
    name: "sample",
    src: "http://www.abc.com/sample.dxf",
    encoding: "gb2312",
}

@woshichen62
Copy link
Author

已经解决了,谢谢

@woshichen62
Copy link
Author

还有一个小问题:
const modelUploader = new LocalDxfUploader(viewer);
通过LocalDxfUploader上传的dxf文件,该如何设置viewer的modelCfg呢?

@woshichen62
Copy link
Author

以下是通过demo预览的效果
image
以下是通过CAD打开的效果,dxf文档中的图片在demo中不显示,是需要哪方面的设置吗?

@woshichen62
Copy link
Author

image
补充CAD预览效果

@yanzexuan1
Copy link
Collaborator

This can be fixed, there is no image in the dxf file. When you process DWG file, you should put image somewhere, so you can access it with a url, then can be rendered properly,

@woshichen62
Copy link
Author

谢谢,我是用libredwg做的转换,同样的dxf文件在AutoCad中是可以看到图片,在咱们的demo中是看不到的,上文说的图片路径是需要单独在demo工程设置吗?能否给一个示例性代码呢……
再次谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants