Article View: adobe.scripting.indesign
Article #1256Re: Maori Macrons: CS3
From: Peter Kahrel
Date: Fri, 13 Feb 2009 06:19
Date: Fri, 13 Feb 2009 06:19
34 lines
1898 bytes
1898 bytes
Steve,
Most fonts that ship with inDesign have the vowels+macron built in, so if those typefaces are ok with you (Minion, Arno, Sabon, etc.), that's the easiest solution.
If the font you want to use doesn't contain the characters you need, then it's better to add them somehow rather than kerning base characters and floating accents together: it's more precise, quicker, and less error-prone. FontLab have a good font editor for this, TypeTool (http://www.fontlab.com/font-editor/typetool/, US$ 99). You can't change letter shapes with it (for that you need its big brother, Studio), but for your purposes it's fine.
If you still want to script this in CS3, here are the basics:
app.findChangeTextOptions.wholeWord = false;
app.findChangeTextOptions.caseSensitive = true;
app.findChangeTextOptions.includeFootnotes = true;
app.findTextPreferences = null;
kern ("a\u00AF", -360, 20);
kern ("e\u00AF", -340, 10);
// Enter more pairs here
function kern (pair, kern_value_1, kern_value_2)
{
app.findTextPreferences.findWhat = pair;
var f = app.activeDocument.findText();
for (var i = 0; i < f.length; i++)
{
f[i].insertionPoints[1].kerningValue = kern_value_1;
f[i].insertionPoints[2].kerningValue = kern_value_2;
}
}
Peter
Technical Details
Message-ID:
<59b7e653.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7e653.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6dd0bd0be7404e6c X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Kahrel" <kahrel@kahrel.plus.com> Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Maori Macrons: CS3 Message-ID: <59b7e653.0@webcrossing.la2eafNXanI> Date: Thu, 12 Feb 2009 22:19:24 -0800 References: <59b7e653.-1@webcrossing.la2eafNXanI> Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit