Photoshop: JSX script empty text layer after font change...

  • 1
  • Problem
  • Updated 1 year ago
  • (Edited)
Not sure if this is working as intended.

I have a one column csv file in Sublime that has Chinese characters at the end and the rest is simply ascii characters.

The script iterate through the file and changes the text and its position based on number of characters.

Since the font assigned to the text layer doesn't have Chinese characters, it flips to the next font that does as it iterates through the csv. For each line in the csv, the text is changed and then a new psd is saved with a distinct name.

At the end of the process, my psd document shows an empty text layer, which I am unable to fill with text (clicking on it simply creates a new text layer). I'm new to photoshop so I'll ask for indulgence here...

If the font switch (to support the Chinese chars) doesn't happen (I supply a all ascii csv) then the text layer at the end isn't empty.

Is this a bug?



ps: I used to work in support so I'd be happy to supply test files etc.
Photo of Antoine


  • 1 Post
  • 0 Reply Likes
  • thankful

Posted 1 year ago

  • 1
Photo of iMatt


  • 122 Posts
  • 10 Reply Likes
Hi Antoine-  It sounds to me like you'd be better off specifying the font you would like Photoshop to use, so that it doesn't switch, or possibly fail.  You need to provide the script with the PostScript name of the font.  You can find this name in the Font Book if you're on a Mac, I don't know where you could locate it on a PC.  I hope that provides some guidance.