Macro Language Reference > Macros > Frame > tffit
  
tffit
Description
Changes the attributes of text contained within a frame so that the whole of the text stream, up to a page break, fits the frame.
 
Example 121. Copyfit text to frame with minimum letter spacing
Up to three text attributes can be selected for copyfitting. The macro shown below specifies the th and tlsb macros: we don't, however, want to reduce the letter spacing to less than 50% of its current value and have therefore specified that its min value should not be less than 50%:
tffit "th",20,200,0,100,"tlsb",50,1000,0,100
 
Example 122. Copyfit text to a frame using a larger typesize
The example below is useful when you just want to see what the text in a frame will look like in a larger type, without being required to change all the paragraph style tags:
tffit "th",1,10000,2,150,"tlb",1,10000,2,150
Syntax
tffit property or edge:t? ( min:f? ( max:f? ) ) mode:n? ( actual:f? ) update:n?
tffit
[no parameter]
Invoke the Frame Copy-Fit dialog box.
property or edge
The name of the text property macro or edges to scale whose value can be changed when copyfitting.
min
The minimum acceptable scaling
max
The maximum acceptable scaling
mode
0
Calculate copy fit automatically when the frame is re-formatted: if the amount of text within the frame has changed, its copyfitting factor will also be changed.
1
Calculate copy fit once on the basis of the text contained in the frame when the tffit macro is applied: even if the amount of text within the frame changes, the copyfitting factor will not be changed.
2
Fix copy fit to the value given in actual.
actual
Override min and max, by providing a multiplier for the attribute's real value. For example: set actual to th ... 300 to increase the type height to 300%.
update
0
Turn off update frame's real values after copyfitting (or tying).
1
Turn on update frame's real values after copyfitting (or tying).