Copy link to clipboard
Copied
Hello!
i am new to developing in javascript as well as to indesign. i have to make a few changes to an existing script. in a user dialouge i get the font size in which the imported table should be. but how can i change the font size of an table???
please respond as soon as possible. thanks very much in advance.
moketas
Hi
do you want do like this (rightside) ?
To apply font to each cell, you must access TextFrame => Table => Cell => any TextObject
var doc = app.documents[0]; // two textframes, they have a table (2x2) var tf_one = doc.textFrames[0]; var tf_two = doc.textFrames[1]; //applied to story tf_one.parentStory.appliedFont = "Myriad Pro\tLight"; tf_one.parentStory.pointSize = 24; //not effective against table text //applied to text-object of each cells of table tf_two.parentStory.tables[0].cells.everyI...
Copy link to clipboard
Copied
Hi
do you want do like this (rightside) ?
To apply font to each cell, you must access TextFrame => Table => Cell => any TextObject
var doc = app.documents[0]; // two textframes, they have a table (2x2) var tf_one = doc.textFrames[0]; var tf_two = doc.textFrames[1]; //applied to story tf_one.parentStory.appliedFont = "Myriad Pro\tLight"; tf_one.parentStory.pointSize = 24; //not effective against table text //applied to text-object of each cells of table tf_two.parentStory.tables[0].cells.everyItem().texts[0].appliedFont = "Myriad Pro\tBold"; tf_two.parentStory.tables[0].cells.everyItem().texts[0].pointSize = 24;
thank you
mg.