Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
JavaScripting in Illustrator for Font Settings

I have a script that opens a new document with the needed profile and settings... Additional settings that would help me would be if I could change the Font Height Setting from "Em Box" to "Cap Height". Is there any way to do that within a script?

var searchString1 = /\d{7}/;
var searchString2 = /(\d)(\d)(\d)/;
var strEnter = prompt("Please Enter the New Order # (a 7-digit number)", "");
var strEnter = strEnter.replace(/^(.{7}).*$/,'$1')

if (strEnter != null && searchString1.test(strEnter) === true) {
var str = null;
var arr = strEnter.match (searchString2);


var doc = app.activeDocument;
var PTS_IN = 72;
var width = 90 * PTS_IN;
var height = 90* PTS_IN;
var presets = app.startupPresetsList;
var preset = presets[3];
//var enterName=prompt("Be Awesome, Do Great Things,... But First, Give This File A Name");
var docPreset = new DocumentPreset();
//add doc Name
docPreset.title = strEnter;
docPreset.units = RulerUnits.Inches;
docPreset.width = width;
docPreset.height = height;
var doc = app.documents.addDocument(preset, docPreset, false);



//var myDocument = app.documents.add();


// SPEC Layer
  // ===========================
var proofLayer = doc.layers.add();
    proofLayer.name = "PROOF";

// PROD Layer
  // ===========================
  var prodLayer = doc.layers.add();
  prodLayer.name = "PROD";

// Make Layer 1 the Active Layer
var aDoc = app.activeDocument;
    aDoc.activeLayer = aDoc.layers.getByName("Layer 1");    
var aLay = aDoc.activeLayer;

} else { alert ("Please Try Again\nInvalid Order #: \n\n" + strEnter);
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!