这是我的代码,设置字体TextRange
iFont=119
,font name ="Tunga"
var oTypedValRp = new TypedVal();
oTypedValRp.valType = Constants.FT_Integer;
oTypedValRp.iVal = iFont;
oDoc.SetTextVal (oTextRange,Constants.FP_FontFamily, oTypedValRp);
但结果:TextRange
的字体名称为"Symbol"
为什么呢?如何将字体设置为TextRange
?
全部谢谢!
答案 0 :(得分:0)
我通过代码设置字体ok:
var props = AllocatePropVals(1);
props[0].propIdent.num = Constants.FP_FontFamily;
props[0].propVal.valType = Constants.FT_Integer;
props[0].propVal.ival = iFont;
oDoc.SetTextProps(textRange, props);