CrestGraphics Posted April 2, 2013 Share Posted April 2, 2013 I've got a text frame that includes: OfficePhone CellPhone Email Some of the clients dont have an OfficePhone, while some dont have a Cellphone, so "Supress if Empty" is on. However, some of their email addresses are too long to fit on their business card. Is there a way to shrink the long emails to fit on one line, and leave the other two fields untouched? Thank you! Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted April 2, 2013 Share Posted April 2, 2013 (edited) The CopyfitEmail() function works by identifying the @ character and copyfitting everything to the right. If you want to copyfit the entire line, use the CopyfitLine() function instead. It is used in a similar manner, although there are some added attributes. The basic function reads: CopyfitLine(staticpart, dynpart, font, size, width, minimum, justwidth) • staticpart – written as a string, this declares the text that should remain static and not be copyfitted. • dynpart – written as a string, this declares the text that should be copyfitted. • font – this is the name of the typeface to be used when copyfitting. • size – this is the size of the text that is not to be adjusted or fitted. • width – this is the width of the frame, in points. • minimum – this is the minimum font size, in points, that should be used when copyfitting. • justwidth – expressed as a boolean (true or false), this tells FusionPro to stretch the text’s width (true) or leave the width as-is (false). The rule would look like this: return CopyfitLine( Field(“email”), “Arial”, 12, 300, 8, true); Change the font name and frame width as appropriate. Or you can write your own Copyfit logic using the FusionProTextMeasure object. Edited April 2, 2013 by Alex Marshall Quote Link to comment Share on other sites More sharing options...
CrestGraphics Posted April 2, 2013 Author Share Posted April 2, 2013 Thanks a lot Alex! Worked like a charm. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.