Const DEFAULT_CHARSET As Long = 1 Const FIXED_PITCH As Long = 1 Const FF_ROMAN As Long = 16 Dim TextColl As AcadTextStyles Set TextColl = ThisDrawing.TextStyles Dim textStyle As AcadTextStyle Set textStyle = TextColl.Add("Yujun") Dim TypeFace As String Dim Bold As Boolean Dim Italic As Boolean Dim CharSet As Long Dim PitchAndFamily As Long TypeFace = 仿宋_GB2312"
Bold = False Italic = False CharSet = DEFAULT_CHARSET PitchAndFamily = FIXED_PITCH Or FF_ROMAN textStyle.SetFont TypeFace, Bold, Italic, CharSet, PitchAndFamily textStyle.height = 3 textStyle.Width = 0.7
以上代码是我定义的一种字体,但是用的是仿宋_GB2312,也就是Windows自带的字体,但是我想改成CAD特有的.shx字体,如simplex9.shx如何修改,将TypeFace = 仿宋_GB2312"直接改成TypeFace = simplex9.shx"好像不对,
请问各位如何解决,谢谢! |