Jump to content

multiple fonts in one variable


Matt Centa

Recommended Posts

I have an address line were the numbers are one font and the physical address behind it is another font. I do not know how to go about this. It currently forces it to one font. The numbers are Whitney-BookSC and the address is Whitney-Book.

 

3711 MoPac Expwy.

 

I'm using a Mac 10.5.8

Acrobat 9.4.1

FusionPro 7.1P1c

Link to comment
Share on other sites

One way to do this would be to make 2 rules and divide your address up into 2 different elements...

 

NUMBER RULE

position = Field("Address").indexOf(" ");

return Field("Address").slice (0,position);

 

STREET RULE

position = Field("Address").indexOf(" ");

return Field("Address").slice (position);

 

Then just format your NUMBER RULE to Whitney-BookSC and STREET RULE to Whitney-Book.

 

My Rule is looking for the first space in the Address field to decide where to split it. You will have to look at your data and decide if that will work for your specific data or not.

Link to comment
Share on other sites

I would like to be able to keep this as one element and not have to break it up. Is there a way to string these two rules together. to say if it contains a numeric value assign it Whitney-BookSC else Whitney-Book.

return NormalizeEntities(Field("Address")).replace(/\d+/g, '<f name="Whitney-BookSC">$&</f>');

If you give your rule the same name as the data field ("Address" in this example), the rule will be used instead of the field when that variable name is referenced in a text frame.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...