.bounds property gives the coordinates of the actual text content, as shown in the image by the guides and the green circles. I got this by running the simple script
alert(app.activeDocument.activeLayer.bounds);, which gave these measurements:
What I would expect to be stored in
.bounds, and what I need, is the top-left and bottom-right coordinates of the paragraph box. Does anybody have any good way of getting this?
TextItem.height are getting close, but they give no indication of where on the canvas the text item actually is.
Right now I'm having to find the center of the bounds coordinates and extrapolate from there, but that is not precise enough because it varies 1 or 2 pixels depending on the characters in the text field.