triper 发表于 2005-5-27 16:30:00

文字识别不出来该怎么解决?

我在给CAD图加标注时,字体总是识别不出来(CAD图中显示为?),请问这是怎么回事,该怎么解决?


Dim Draw_Length_T As AcadText


Set Draw_Length_T = ThisDrawing.ModelSpace.AddText("基准线", FZ_Point, 5)

evaporated 发表于 2005-5-27 16:39:00

字体问题吧。


换个字体应该就好了。

mccad 发表于 2005-5-27 21:47:00

'设置字型
Function SetTtfTextStyle(TextStyleName As String, TTFName As String) As AcadTextStyle
       On Error Resume Next
       Set SetTtfTextStyle = ThisDrawing.TextStyles.Add(TextStyleName)
       SetTtfTextStyle.SetFont TTFName, False, False, 0, 0
End Function
' 写文字
Function AddTextWithStyle(TextString As String, InsertionPoint As Variant, Height As Double, Alignment As Integer, TextStyleName As String)
       Dim Text As AcadText
       Text = ThisDrawing.ModelSpace.AddText(TextString, InsertionPoint, Height)
       Text.Alignment = Alignment
       Text.TextAlignmentPoint = InsertionPoint
       Text.StyleName = TextStyleName
End Function

fanny_6 发表于 2005-7-1 22:05:00

好的,搞定了

yj821005 发表于 2005-7-25 16:14:00

<EM>function</EM> SetTtfTextStyle(TextStyleName As String, TTFName As String) As AcadTextStyle<BR>&nbsp;&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;&nbsp;&nbsp; Set SetTtfTextStyle = ThisDrawing.TextStyles.Add(TextStyleName)<BR>&nbsp;&nbsp;&nbsp; SetTtfTextStyle.SetFont TTFName, False, False, 0, 0<BR>End Function<BR>请问明总:这里面的TTFName如果是“仿宋_GB2312”之类的Windows系列的字体的话,用TTFName="仿宋_GB2312"就可以了,但是要设置成CAD特有的字体,如“simplex9.shx”用TTFName="simplex9.shx"怎么好像就运行不了啊!急死了,望各位帮忙解决,谢谢!

yj821005 发表于 2005-7-27 08:14:00

各位大侠请帮帮忙吧!谢谢!

yefeiwolaile 发表于 2007-10-19 19:47:00

<p>在设置acadtextstyle 时用这个呀!</p><p>object.BigFontFile</p>
页: [1]
查看完整版本: 文字识别不出来该怎么解决?