Copy link to clipboard
Copied
textLayer.bounds returns the bounding box area of text which is based on current text. Instead of current text's bounding box area how to get the size of text box (dotted rectangle area) from script?
2 Correct answers
Have you tried TextItem.height and TextItem.width?
As Lumigraphics mentioned, textItem.width and textItem.height work, but it displays in whatever you have your type units set to in the preferences, so you will need to convert to pixels, if that's what you want. And if you have your type units set to pixels, it will give a false reading of pixels, if you don't have the document's resolution set to 72ppi.
Explore related tutorials & articles
Copy link to clipboard
Copied
Have you tried TextItem.height and TextItem.width?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
As Lumigraphics mentioned, textItem.width and textItem.height work, but it displays in whatever you have your type units set to in the preferences, so you will need to convert to pixels, if that's what you want. And if you have your type units set to pixels, it will give a false reading of pixels, if you don't have the document's resolution set to 72ppi.

