Jump to content

Font Tag Usage


Recommended Posts

Hi All,


I'm attempting to apply a specific font to a line of text in a rule and cannot seem to get the usage correct. Not only is the font I want not applying, no font name I try seems to work.


I've gutted the rule so this is the only thing being returned


strContent = "<f name='HelveticaNeueLT Std Lt'><tracking newsize='3.5'>1234 Some Building Name</tracking></f>"


Regardless of what I put as a value for "name", the result ends up as Arial.


What am I missing here...


Thank you in advance,


Link to comment
Share on other sites

strContent = "<f name='HelveticaNeueLT Std Lt'><tracking newsize='3.5'>1234 Some Building Name</tracking></f>"

No, that's not right. It's valid JavaScript, but what's getting returned is <f name='HelveticaNeueLT Std Lt'>, which is not a valid tag that FusionPro recognizes. You need to use double-quotes around attribute values in tags.

return '<f name=HelveticaNeueLT Std Lt><leading newsize=3.5>' + 1234 Some Building Name; + '</leading></f>';

That's not quite right either. Actually, it gives me a syntax error when I validate in the Rule Editor. Even if you added more single-quotes around the middle part, the first tag being returned is still just <f name=HelveticaNeueLT Std Lt>, which is also not valid without double-quotes for the attribute value.


I think you want to do this:

return '<f name="HelveticaNeueLT Std Lt"><tracking newsize="3.5">1234 Some Building Name</tracking></f>';

Note the use of double-quotes around the attribute values for the tagged markup parser, and single-quotes around the entire JavaScript string literal.


Even then, though, I'm not sure it's actually the right font name. You need to do a regular composition (not a Preview) and look at the log (.msg) file to see if there are any warnings about fonts.


The best way to determine the exact syntax to use in the <f> tag is to create a Formatted Text Resource (from the menu, FusionPro -> Data Definition -> Input Options -> Edit Resources -> Add, select "Formatted Text" in the "Type" drop-down), click Edit, select the font you want and type some text in the Variable Text Editor, then click OK, and then click "View Source". Locate the <f name="***"> tag and copy it from the box. You can Cancel out without saving the resource. Then you can go back into your rule and paste in that tag with the correct font family name.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...