Jump to content

Copyfit, we meet again


esmith

Recommended Posts

I have a text frame that can allow for up to 4 lines of text. However, for one version of the output, I need to limit my output to two just two lines. The data is coming from a web portal interface designed to allow a maximum of 35 characters which defaults to two lines 90% of the time based on the font size, but I need to horizontally scale the data for the remaining 10% of the time when too many Ms or Ws are used, causing the data to want to break to three lines.

 

I thought I would be able to use a variation of DSweet's CopyfitLineHorizontal function in which my width was set to double the frame's width (4.5") to effectively alter the setwidth value to fit results on two lines, but it doesn't seem to be working:

 

return CopyfitLineHorizontal("Mow-mow mower melt winning wine won", "SansSerifFLF-Demibold", 34, 645, 30, true);

I tried changing the values of "minimum", "width" and "justwidth" in the function to various extremes in an attempt to see how they affected the text, but never got a satisfactory result. Any ideas on what I could do to accomplish my goal?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...