davers Posted April 17, 2012 Share Posted April 17, 2012 Hi, Is there a way to make the font size equal on both sides of a bilingual business card (English/French), when copy fit only needs to reduce the font size of the information on one side of the card (French) and not the other (English)? Example: I'll have a card where the English is at the standard size 10pt and the French side is copy fit to 8.5pt. Is there a way to make both sides equal based on the smallest sized text of the card i.e. 8.5pt. Also, can this be done using %? Thanks. Domenic Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted April 17, 2012 Share Posted April 17, 2012 If you only want to fit a single line without affecting the rest of the text in the flow, you can use the CopyfitLine function in a JavaScript rule. See the User Guide for more information. Quote Link to comment Share on other sites More sharing options...
step Posted April 17, 2012 Share Posted April 17, 2012 Maybe putting something like this in your OnRecordStart Callback Rule could help you out: var frameWidth = 1 * 7200; // width in inches (this example's text box is 1 inch wide) var tm = new FusionProTextMeasure; tm.pointSize = "10 pt"; // set the type size tm.font = "Helvetica"; // set your typeface tm.CalculateTextExtent(Field("french")); // Replace with your field var tmWidth = tm.textWidth; //return tmWidth; if (tmWidth < frameWidth){ size = 10; } else { size = 10*(frameWidth/tmWidth); } FindTextFrame("English").content = "<z newsize=" + size + " pt>" + Field("english"); FindTextFrame("French").content = "<z newsize=" + size + " pt>" + Field("french"); This code measures the width of the French translation and depending on whether or not it can fit in the text frame, sets the point size to 10 or a percentage of frame width to length of the french translation. It then populates your frames (in this example named "French" and "English") with the contents of the respective fields with the same point size for the font. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 17, 2012 Share Posted April 17, 2012 The simplest way to do this is to connect the two text frames into a single flow and insert a rule with this syntax in between the two blocks of text: return "<p verticalstart=topofcolumn br=false>";There's more about that here: http://forums.pti.com/showthread.php?t=519 The more complicated way is to "roll your own" copyfitting with the FusionProTextMeasure object, as described here: http://forums.pti.com/showthread.php?t=838 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.