Detecting/Correcting text overflow
Hi folks,
Has anyone here ever been able to successfully determine if a TextItem in PS has overflow in it? Basically I am trying to write a script that replaces text in a document. If this in turn causes text overflow I would like the script to reduce the point size. I have done a few exeriments with both point and paragraph text.
There seems to be no obvious methods or properties for determining that overflow occurs. I thought I could cheat and measure the widths and heights of the text items before I replace the text, then check to see if they are different afterwards and if so, reduce the point size.
However in the case of point text it is not possible to determine the text width so I would have to do something like rasterize it then do the measurement. In the case of paragraph text the height and width of the text box do not change if there is overflow.
Does anyone have any better, more efficient ideas?
cheers
Ben
