Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

problem size font on photoshop cc script add name on picture

$
0
0

no problem on cs6 when i run  this script on cs6

 

/ add document name in text layer script; 

#target photoshop

 

 

if (app.documents.length > 0) { 

var myDocument = app.activeDocument; 

var originalUnits = app.preferences.rulerUnits; 

app.preferences.rulerUnits = Units.PIXELS; 

// getting the name; 

var docName = myDocument.name; 

//getting the location; 

//var docPath = myDocument.path; 

// make the layer; 

var myLayerRef = myDocument.artLayers.add(); 

myLayerRef.kind = LayerKind.TEXT; 

myLayerRef.name = "text"; 

var myTextRef = myLayerRef.textItem; 

myTextRef.size = 45; 

myTextRef.font = "Courier"; 

myTextRef.justification = Justification.RIGHT; 

//Set text colour in RGB values 

var newColor = new SolidColor(); 

newColor.rgb.red = 255; 

newColor.rgb.green = 255; 

newColor.rgb.blue = 255; 

myTextRef.color = newColor; 

// Set the position of the text - percentages from left first, then from top.

myTextRef.position = new Array( myDocument.width - 85, myDocument.height - 85); 

myLayerRef.blendMode = BlendMode.NORMAL; 

myLayerRef.opacity = 100;

myTextRef.contents = docName; 

app.preferences.rulerUnits = originalUnits; 

}; 

 

But with photoshop CC 2014 the size text appear at 2.88 points and on the script i set to 45 points.

i need help

Please


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>