// Text Poster — Adobe Illustrator compatible
// Adds point-text headlines with sized character attributes and colour.
#target illustrator

var doc = app.activeDocument;

function addLine(str, x, y, size, col) {
    var tf = doc.textFrames.add();
    tf.contents = str;
    tf.position = [x, y];
    tf.textRange.characterAttributes.size = size;
    tf.textRange.characterAttributes.fillColor = col;
    return tf;
}

var dark = new RGBColor(); dark.red = 30; dark.green = 30; dark.blue = 40;
var accent = new RGBColor(); accent.red = 230; accent.green = 60; accent.blue = 90;

addLine("SVG", 40, 90, 72, dark);
addLine("EDITOR", 40, 150, 72, accent);
addLine("Illustrator-compatible scripting", 42, 185, 20, dark);

app.redraw();
