Somebody mention me? SourceForge is acting up so you will need to download xtools: SourceForge The files of interest are xtools/xlib/Text.jsx and xtools/xlib/TextTest.jsx. It can be done but it requires a bit of work. Here is the relevant code from TextTest.jsx that shows you how it's done. var layer = doc.layers[layerName]; doc.activeLayer = layer; var opts = new TextOptions(layer.textItem); opts.contents = "123567875688\radsfasfasdfasdfasdf\n(&#^&^#$"; // construct the styles var s1 = new TextStyle("ArialMT"); var s2 = new TextStyle("Courier-Bold", 30, Text.toRGBColor(0, 255, 0)); // this style will use the default font... var s3 = new TextStyle(undefined, 42, Text.toRGBColor(255, 0, 0)); // superscript test var s0 = new TextStyle(s1); s0.baseline = PSString.superScript; // Now create the set of ranges to apply the styles over var ranges = new TextStyleRanges(); ranges.add(new TextStyleRange(0, 1, s0)); ranges.add(new TextStyleRange(1, opts.contents.length, s1)); ranges.add(new TextStyleRange(5, 10, s2)); ranges.add(new TextStyleRange(7, 15, s3)); ranges.add(new TextStyleRange(25, undefined, s2)); opts.ranges = ranges; Text.modifyTextLayer(doc, opts, doc.layers[layerName]); As somebody said before, InDesign is a more appropriate tool.
... View more