Skip to main content
Participant
February 6, 2025
Question

Scale Text on a layer? textItem.size = X doesn't work.

  • February 6, 2025
  • 1 reply
  • 128 views

Hi I've been working on this photoshop script all day(testing and googleing) and can't find a solution so hoping someone smarter than me knows the anwers.

 

I'm simply trying to scale text. I don't want the layer to move. I'm not sure why setting the value for 

textItem.size makes the layer move. I've tried manually moving back but still having issues and thinking I'm making this too complicated.
 
When I get the textItem.size it returns 313.###### pt but it clearly says 128 pt in the GUI.
When I update textItem.size the layer shifts to some random value.
textItem.size = new UnitValue(128, 'pt');
 
Why is there not a simple way to update the text size from a photoshop script? What am I doing wrong?
 
Thank you!

1 reply

Michael Chow
Inspiring
February 6, 2025

@easygoing_Phoenix5064 I am not a big-scripting person, but have you tried AI, such as ChatGPT, CoPilot, Gemini? I guess I could do that, but as I tell my students, code is like math, you either get it, or you don't. I don't get it!