Skip to content
Discussion options

You must be logged in to vote

The problem has been solved. I hope it will be helpful to future guys.
The reason is that AutoCAD replaces fonts that are not available with usable fonts, so Chinese can be displayed normally in AutoCAD, but ezdxf does not have this operation.
When using ezdxf and adding Chinese, it is necessary to specify the arialuni.ttf font, and the operating system should also install this font. When exporting PNG images, Chinese can be displayed normally.

doc.styles.add('myChineseStyle', font=font_path)
dim = msp.add_aligned_dim(p1=pos_mid, p2=pos_end, distance=5.0, text=name,
override={'dimtxsty': 'myChineseStyle', "dimtxt": 200,…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by JeanWang0824
Comment options

You must be logged in to vote
4 replies
@JeanWang0824
Comment options

@JeanWang0824
Comment options

@mozman
Comment options

@JeanWang0824
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants