Photoshop CC 2014: Extendscript - Problems with Typography manipulation

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
  • (Edited)
Hi. I have an extendscript script that (amongst other things) overlays some type over an image. The script dynamically sets the font-size - but i just upgraded to CC2014 and it's suddenly broken.

var identity = "some text"
var newLayerRef = docRef.artLayers.add();
newLayerRef.kind = LayerKind.TEXT;
var textItemRef = newLayerRef.textItem
textItemRef.contents = identity;
app.preferences.typeUnits = TypeUnits.POINTS;
var textSize = 100;
// Set Text Size
if (identity.length < 11) textSize = 200;

textItemRef.size = textSize;

That works in CC, but not in CC14. If I add:

alert(textSize + " " + textItemRef.size);

I get "100 6.4px". So I can read the size - but not set it for some reason.

Bug?
Photo of Steven Nicholson

Steven Nicholson

  • 1 Post
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
Official Response
Should be fixed in the 2014.2.2 update. Choose Help>Updates... to install.