After replacing a text and opening it in PS, the text moves when updating the textlayers. This happened to me before, but this is another case.
Explanation:
What I am doing is replacing the text of a textlayer according to the content loaded in a text file that is taken as input parameter to the program. Take into account that the text box of the text layer is large to adjust it later. After replacing the text, the textlayer is set to center left, in this process I obtain the height of words and I set the same height to the textbound. The textlayer box would have to have the same height as the words, and in this case it will be located in the center left, and with the width and height modified.
- When you open it in Photoshop and accept the update banner:
Before-Update-in-Photoshop.png (150.0 KB) - a. In the first banner, the text box is shorter, stopping showing the text completely:
b. In the second banner, the textbox is moved in another location
After-Update-in-Photoshop.png (128.7 KB) - a. Adjusting the text box so that the text is completely displayed:
photoshop-adjusting-size.png (128.4 KB)
b. Founding text in a different location
PS-After-AdjustTextBox.png (5.9 KB)
PSD used and input txt:
text_moves_after_update.zip (8.7 MB)
Code used:
code-moves-after-update-photoshop.zip (1.3 KB)