Copy link to clipboard
Copied
HI everybody,i have four textFrames in the layer,the content is "24","32","15","48".But as show on the image,the TextFrame of "24" and "48" is hidden because of large font size.so i hope to pick out the textFrames which are hidden and change the font size for them.Is there any way to do this by script? ---Sorry for my poor english..
Bonjour,
Voilà une ébauche de script,
pour plus de détails, me contacter par mail.
elleere
Sélectionnez un texte captif "AREATEXT"
// JavaScript Document
// text essai voir.js
// De elleere Landry René
// Wed, 2 September 2020 16:01:11 GMT
// INIT --------
var pas = 5;
//--------------
var origObjet = selection[0];
var corps = origObjet.textRange.characterAttributes.size;
var duplicObjet, hauteur = -10;
while (hauteur < 0) {
var VecText;
duplicObjet = origObjet.duplicate(or
...
Copy link to clipboard
Copied
What you would need to search for is not "Hidden" text, but "Overset" text.
I'm not sure if there is a script available.
Copy link to clipboard
Copied
Thanks,it's helpful and i find some answers.Mostly suggest to use "JET_AutoFitVertical.jsx" but the download link is not available any more.
Copy link to clipboard
Copied
Autofit won't help you a lot, because it adjusts the textframe, not the text. Also I'm not sure if it will work on irregularly shaped textframes.
But if you wish to try that, there is a script to adjust frame height on Kelsocartography.com
Copy link to clipboard
Copied
Bonjour,
Voilà une ébauche de script,
pour plus de détails, me contacter par mail.
elleere
Sélectionnez un texte captif "AREATEXT"
// JavaScript Document
// text essai voir.js
// De elleere Landry René
// Wed, 2 September 2020 16:01:11 GMT
// INIT --------
var pas = 5;
//--------------
var origObjet = selection[0];
var corps = origObjet.textRange.characterAttributes.size;
var duplicObjet, hauteur = -10;
while (hauteur < 0) {
var VecText;
duplicObjet = origObjet.duplicate(origObjet,ElementPlacement.PLACEAFTER);
VecText = duplicObjet.createOutline();
hauteur = VecText.height;
if (hauteur < 0) {
corps -= pas;
origObjet.textRange.characterAttributes.size = corps;
}
VecText.remove();
}
Copy link to clipboard
Copied
Hi,Thanks for you answer, it's a good method.