Jump to content

Apply copyfit to only one line in a text frame


Ryan_B

Recommended Posts

Is there a way to apply copyfit to only one line in a text frame?

 

I'm working on a business card that has your standard variables. If one of the fields, say title, exceeds the width of the text frame, I want to shrink just that line. I'm not sure if this is possible or not.

If every field was required, I'd simply draw individual text frames and put copyfit on each of them individually. Since this is not the case however, if a field were to be omitted, I'd have to dynamically move the other frames to emulate suppression. This will obviously involve a lot of extra rules needing to be created. It wouldn't be a huge deal if it were just this one business card, but the client has several (20 or so) different cards all with different layouts.

Anyone have any ideas?

Link to comment
Share on other sites

Thanks Dan. Do you know of a way to incorporate the "Do not break on copyfit" functionality?

I don't understand what you're asking. The "Do not break on copyfit" check box (on the Paragraph Formatting dialog) has no effect unless full-flow copyfitting is in use. It doesn't affect a line that you're already forcing to not break with the CopyfitLine function.

 

In a given flow, you should either use full-flow copyfitting (by clicking the "Adjust text to fit" button on the Overflow Options dialog) OR you should use the CopyfitLine function on individual lines. You shouldn't do both in the same flow.

Link to comment
Share on other sites

return CopyfitLine("", Field("Name"), "Adobe Garamond Pro", 20, 137, 6, false);

 

The parameters to CopyfitLine, in order, are:

• staticPart - text to not be resized

• dynamicPart - text to be resized (after staticPart)

• font - font family name

• size - base point size (in points)

• width - width of the frame or column (in hundredths of points)

• minimum - minimum point size (in points)

• adjustWidthOnly - true/false (optional - see below)

For the "adjustWidthOnly" parameter, if you leave it off (or specify false), the function will adjust the point size, that is, both the width and height, of the glyphs. If you specify true, the function will adjust only the set width of the glyphs, but not the height, which basically means they will look squished horizontally.

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...