How set FontName to TextRange in Framemaker?

89 Views Asked by At

This is my code , set font of 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);  

But Result :TextRange has font name ="Symbol"

Why? How can set font to TextRange?

Thanks all!

1

There are 1 best solutions below

0
On BEST ANSWER

i set font ok by code:

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