2 Replies Latest reply on Mar 25, 2011 1:09 AM by paon.m

    pointSize problem

    paon.m

      Hi,

      I have a problem to set a float value as point size of a line,character,word,etc.. :

       

      line.pointSize=7.6; //NOT WORK

        line.pointSize=7; // WORK!

       

      I have to set a line point size to 7,6 pt. What I have to do?

      I'm working with Indesign Server CS4 and CS5.

       

      Thanks in advance

       

      Massimo

        • 1. Re: pointSize problem
          Harbs. Level 6

          What happens if you try this?

           

          line.pointSize = "7.6";

           

          Harbs

          1 person found this helpful
          • 2. Re: pointSize problem
            paon.m Level 1

            I found the problem, but i don't understand why..

            This is my code that work :

             

            var lines=clone.lines;

            for (var z=0; z < lines.length-1; z++) {
                  lines[z].contents=' \r';
            }                   
                               
            var last_line=clone.lines.lastItem();

            last_line.pointSize = "7.6";

             

            This is the old code that don't work:

             

            var last_line=clone.lines.lastItem();

            last_line.pointSize = "7.6";

             

            var lines=clone.lines;

            for (var z=0; z < lines.length-1; z++) {
                   lines[z].contents=' \r';
            }

             

            Probably when I set the content of the previous line to ' \r' also the content of the last line is influenced. But with integer values of pointSize also the old code work.., it's weird.