1 Reply Latest reply on Jan 7, 2013 3:52 PM by Jump_Over

    About tabulation and leader

    Pierre-RAFFA Level 1

      Hi all,

       

      I attempt to determine the number of "characters" created when tabulation contains leader ( cf "Tabs" panel or CMD + Shift + t ). This leader can be a dot per exemple.

      Of course when I do myTab.characters.length, that returns 1.

      I checked in CSSDK but i didn't find anything about it.

      Any ideas ?

      Thanks.

       

      Pierre RAFFA.

        • 1. Re: About tabulation and leader
          Jump_Over Level 5

          Hi,

           

          It seems there is no "leaderCount" property for tabStop.

          This count depends on tab font, pointSize, horizontalScale, kerningValue, tracking etc.

           

          You could try to calculate the space which is substraction of tab endHorizontalOffset and horizontalOffset.

          To find a tab character in specific myPara you could use myPara.findText() with

          app.findTextPreferences.findWhat = "^t";

           

          Now there is a question what is your leader width supposed to be  (how many of them should be used to fill a space). There are some calculations to do. This way would lead you to calculate i.e. kerningValue for tab which could be set to fill tab space with desired count of leader..., I guess

           

          rgds