Jump to content

Copyfitting with adjusting leading

Recommended Posts



I have a text frame which contains 3 lines of text. The top line contains variable data but the two lines below the text doesn't change and so always fits. I've applied copyfitting to the whole frame, so that the top line always fits on one line and the two lines below always match the top line size.


I have absolute leading set on the frame but what I would like is that if the text shinks by 25% to fit then the leading reduces by 25% at the same time, but I can't use auto leading because I need it to be tighter than the default.


Is it possible to set the leading to adjust according to the type size but still control it's relative height?




Link to comment
Share on other sites

OK for anyone interested I've found the answer, I can use the magnify tag.


I set my text frame to auto-leading and switch on copyfitting, then instead of placing my content field I place this rule:-


return "<magnify type=leading factor=85>" + Field("mycontent") + "</magnify>";


That gives me leading which adjusts to match the copyfitting but allows me to have tighter (by 85%) leading than the default 120%.

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.

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