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

[basiljs] set text properties of overflow text

Community Beginner ,
Apr 17, 2013 Apr 17, 2013

Copy link to clipboard

Copied

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();

TOPICS
Scripting

Views

749

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
Contributor ,
Apr 17, 2013 Apr 17, 2013

Copy link to clipboard

Copied

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.

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 Beginner ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

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?

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
Contributor ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

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.

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 Beginner ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

LATEST

yeah maybe it's return like you said.

Anyway, value is pretty close so i keep it like this.

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