Adobe 23101764 Scripting Guide - Page 84
Setting text stroke colors, Setting fonts
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 84 highlights
Scripting Photoshop 3 Text item object 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 3.15, "Color objects" on page 91 for more information on working with colors. AS: set stroke color of textItemRef to {class:CMYK color, cyan:20,¬ magenta:50, yellow:30, black:0} 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® names for the fonts. The PostScript names are not the names 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 80