Skip to main content
Known Participant
April 17, 2013
Question

[basiljs] set text properties of overflow text

  • April 17, 2013
  • 1 reply
  • 775 views

When i change the pointSize or any other propertie then only the text that is visible get's changed.

The text in the overflow is not.

How can i effect all text?

#includepath "~/Documents/;%USERPROFILE%Documents";

#include "basiljs/bundle/basil.js";

function setup() {

       b.units(b.MM);

  }

function draw() {

   var t = b.text("sad", 20, 20, 100, 200);

    t.contents = TextFrameContents.placeholderText;

    b.itemHeight(t, b.itemHeight(t)/2);

    b.typo(t, "pointSize", 4);   

    b.itemHeight(t, b.itemHeight(t)*2);

}

b.go();

This topic has been closed for replies.

1 reply

milligramme
Inspiring
April 18, 2013

Hi,

always I use TextFrame.parentStory instead of TextFrame.texts to effect all texts.

this story object includes overflowed texts

    // HERE
    b.typo(t.parentStory, "pointSize", 4);   
    b.itemHeight(t, b.itemHeight(t)*2);
}
 
b.go();

thank you

mg.

Known Participant
April 18, 2013

thanks.

one more.

I tried to get all characters of a text.

var charsAmount = b.characters(targetItem.tekst.parentStory).length;

But the amount is different from the info window in indesign any idea why?

milligramme
Inspiring
April 18, 2013

Hi

I think panel in InDesign doesn't count ReturnCode as character.

it should be

charsAmount  == count in panel + ( paragraphs.length - 1 )

maybe is for Editor, not for Programmer!

thank you

mg.