• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Select all doc text having the same font size as selected text

Engaged ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Hi,

it is possible using script to select all other curent document text frames having the same font size?

Image-2022-06-09-11-11-ps.jpg   scipt →    Image-2022-06-09-11-13-ps.jpg

TOPICS
Scripting

Views

563

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Engaged , Jun 09, 2022 Jun 09, 2022

Solved for me, I found a script 🙂

script source

https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/31533550-select-same-font-size-style-typeface-size

if ((app.activeDocument.selection.length == 1) && (app.activeDocument.selection[0].typename == "TextFrame")) {
var selectedText = app.activeDocument.selection[0];
var textObjects = app.activeDocument.textFrames
var numTextObj = textObjects.length;
for ( j = 0 ; j < numTextObj; j++ ) {
if(textObjects[j].te
...

Votes

Translate

Translate
Community Expert , Jun 09, 2022 Jun 09, 2022

there's a native solution (also in the same uservoice you posted)

 

Select->Same->Font Size Menu

Votes

Translate

Translate
Adobe
Engaged ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Solved for me, I found a script 🙂

script source

https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/315...

if ((app.activeDocument.selection.length == 1) && (app.activeDocument.selection[0].typename == "TextFrame")) {
var selectedText = app.activeDocument.selection[0];
var textObjects = app.activeDocument.textFrames
var numTextObj = textObjects.length;
for ( j = 0 ; j < numTextObj; j++ ) {
if(textObjects[j].textRange.length > 0 && textObjects[j].editable==true && !textObjects[j].locked && !textObjects[j].hidden ){
if ( selectedText.textRange.characterAttributes.size == textObjects[j].textRange.characterAttributes.size ){
selCValue = selectedText.textRange.characterAttributes.textFont.name ;
txtCValue = textObjects[j].textRange.characterAttributes.textFont.name ;
if (selCValue == txtCValue ) {
textObjects[j].selected = true;
}
}
}
}
} else {
alert ("You must only have a single text object selected");
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Well done! 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

LATEST

there's a native solution (also in the same uservoice you posted)

 

Select->Same->Font Size Menu

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines