Skip to main content
December 2, 2010
Question

How to determine column inches in a text frame with intersecting frames?

  • December 2, 2010
  • 2 replies
  • 1504 views

I am trying to write a script to determine how much text would fit in a text frame before actually having the text. If the frame has no run-around areas intruding on the frame it is the simple depth of the frame. Is there an easy way to determine the area of the frame with the obstructed areas subtracted?

This topic has been closed for replies.

2 replies

Harbs.
Brainiac
December 3, 2010

How do define "how much"?

Different glyphs take up different amounts of horizontal space, so it's impossible to know the number of characters that will fit before you know what they are...

Harbs

December 3, 2010

When working with newspapers, they measure in column inches which uses an average character width to make a good estimate how big a story can fit into an area. When the area is a rectangle for the text the column inches is the number of columns in the frame times the depth of the frame. When another frame covers one of the columns, this area needs to be subtracted to find the equivilent depth.

tomaxxi
Inspiring
December 2, 2010

Maybe you could fill text frame with placeholder text:

myTextFrame.contents = TextFrameContents.placeholderText;

Hope that helps.

--

tomaxxi

http://indisnip.wordpress.com/

December 3, 2010

I need to do this calculation a lot. To use this, I guess I would save any text that may be in the frame, fill it with placeholder text and calculate the size, then remove the placeholder text and replace the starting text. I hope there would be a faster way. Any other ideas?

Kasyan Servetsky
Brainiac
December 4, 2010
Any other ideas?

You can use InCopy's copyfitting text feature.

Kasyan