如何在Framemaker中将FontName设置为TextRange?

时间:2015-10-22 12:05:30

标签: framemaker

这是我的代码,设置字体TextRange

iFont=119font name ="Tunga"

var oTypedValRp = new TypedVal();
oTypedValRp.valType = Constants.FT_Integer;
oTypedValRp.iVal = iFont;                                                  
oDoc.SetTextVal (oTextRange,Constants.FP_FontFamily, oTypedValRp);  

但结果:TextRange的字体名称为"Symbol"

为什么呢?如何将字体设置为TextRange

全部谢谢!

1 个答案:

答案 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);