Jump to content

Equal font size on copy fit for 2-sided cards


davers

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...