Question
How to set font size with Extendscript
I am trying to set the font family, size and style of the selection using ExtendScript. Family and Style are applied correctly but the font size stays the same. FM2019. What am I doing wrong?
FA_Errno is set to FE_Success after the operation.
function fixText(targetDoc){
var i = 0;
var arial = GetFontFamilyValue("Symbol");
var textProps = AllocatePropVals(3);
i=0;
textProps[i].propIdent.num = Constants.FP_FontFamily;
textProps[i].propVal.valType = Constants.Integer;
textProps[i].propVal.ival = arial ;
i++;
textProps[i].propIdent.num = Constants.FP_FontSize;
textProps[i].propVal.valType = Constants.Integer;
textProps[i].propVal.ival = 36 * 65536;
i++;
textProps[i].propIdent.num = Constants.FP_Underlining;
textProps[i].propVal.valType = Constants.Integer;
textProps[i].propVal.ival = Constants.FV_CB_SINGLE_UNDERLINE;
var tr = targetDoc.TextSelection;
targetDoc.SetTextProps(tr, textProps);
PrintFAErrno ();
return;
}
