Jump to content

Change NumberFont in resource


Jeff Odom

Recommended Posts

I have multiple resources that are location addresses. I need to change the numberfont to a different font than the text. I have tried to apply Dan's suggestion in this thread: http://forums.pti.com/showthread.php?t=1720&highlight=Proportional+Lining

var numberFont = "Arial"; 

var text = NormalizeEntities(Rule("Change phone format Rule")); 

return text.replace(/(\d+\s*)/g, function(d){return '<f name="' + numberFont + '">' + d + '</f>';});

but when changing Rule("Change phone format Rule") to Resource("Washington") it just returns "Resource("Washington").

 

 

 

Any suggestion on how I can apply the change numberfont rule to a resource?

Link to comment
Share on other sites

I think you need to use Dan's rule up further in the post. You are using a rule for a different question about Phone numbers, not the numbers in an address field.

 

var numberFont = "Arial";
var text = NormalizeEntities(Field("Add1"));
return text.replace(/(\d+\s*)/g, function(d){return '<f name="' + numberFont + '">' + d + '</f>';});

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...