Copy link to clipboard
Copied
How to select all text frames with same font (for example 'NewCenturySchlbk-Roman') and apply auto kerning?
Thanks.
For all opened documents:
for (i = 0; i < app.documents.length; i++) {
var targetDocument = app.documents;
activeDocument = targetDocument;
var docRef = app.activeDocument;
for (var w = 0; w < docRef.textFrames.length; w++) {
var textRef = docRef.textFrames
if (textRef.textRange.characterAttributes.textFont == textFonts.getByName('NewCenturySchlbk-Italic')) {
textRef.textRange.characterAttributes.kerningMethod = AutoKernType.AUTO;
}
}
redraw();
}
Copy link to clipboard
Copied
For all opened documents:
for (i = 0; i < app.documents.length; i++) {
var targetDocument = app.documents;
activeDocument = targetDocument;
var docRef = app.activeDocument;
for (var w = 0; w < docRef.textFrames.length; w++) {
var textRef = docRef.textFrames
if (textRef.textRange.characterAttributes.textFont == textFonts.getByName('NewCenturySchlbk-Italic')) {
textRef.textRange.characterAttributes.kerningMethod = AutoKernType.AUTO;
}
}
redraw();
}
Copy link to clipboard
Copied
Hi,
Do you how we could change this script to select every text which has the same font type ? (for example select every "Zurich TL - Bold" etc)
Thank you,
PY
Find more inspiration, events, and resources on the new Adobe Community
Explore Now