Adobe 23101764 - Photoshop CS - PC Manual page 84

Scripting guide
Hide thumbs Also See for 23101764 - Photoshop CS - PC:
Table of Contents

Advertisement

3.11.2 Setting text stroke colors
Setting the stroke color in AppleScript is a bit different then setting it in Visual Basic or
JavaScript. To set the stroke color in AppleScript, use one of the color classes: CMYK color,
gray color, HSB color, Lab color, or RGB color.
To set it in Visual Basic or JavaScript, you must first create a SolidColor object and
appropriately assign one of the color classes to it. The following examples show how to set the
stroke color of a text item-object to a CMYK color.
See section
AS:
set stroke color of textItemRef to {class:CMYK color, cyan:20,¬
VB:
Set newColor = CreateObject ("Photoshop.SolidColor")
newColor.CMYK.Cyan = 20
newColor.CMYK.Magenta = 100
newColor.CMYK.Yellow = 30
newColor.CMYK.Black = 0
textLayerRef.TextItem.Color = newColor
JS:
var newColor = new SolidColor();
newColor.cmyk.cyan = 20;
newColor.cmyk.magenta = 100;
newColor.cmyk.yellow = 30;
newColor.cmyk.black = 0;
textLayerRef.color = newColor;
3.11.3 Setting fonts
To set the font of your text item object, set the text item's font property. The font names that
you can use are the PostScript
that are displayed in Photoshop's character palette. The steps below show how to find a
PostScript font name.
1. Using the Photoshop user interface, create a new Photoshop document.
2. Create a new text layer and add some text to it.
3. Select the text you created in step 2.
4. Select the desired font from the Font pull down menu (for example, "Arial")
Photoshop CS Scripting Guide
3.15, "Color objects" on page 91
magenta:50, yellow:30, black:0}
®
for more information on working with colors.
names for the fonts. The PostScript names are not the names
Scripting Photoshop
Text item object
3
80

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs

Table of Contents