During the development of InDesign plugin, one may need to set the grid alignment for any paragraph style. There are 3 values that can be set for grid alignment:- All lines, None, FirstLine Only.
We can easily do this by creating text attribute and applying it to the intended style in the following way, /*** Code ***/ |
Now, the problem arises when we want to set it to “First line only” because from all the available 8 values of Text::GridAlignmentMetric, none of them sets it to “First line only”.
The solution is for this we have to set grid alignment to “All lines” (using above code) and set one more attribute as true. This can be done using kTAGridAlignOnlyFirstLineReportBoss. /*** Code ***/ |