Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Setting boxText height based on the text value

$
0
0

Hi, I am creating some text boxes and I am trying to find some way in which, having a fixed box width, I can adjust the height of the box according to the text:

 

var textBox = app.project.activeItem.layers.addBoxText([600, 0], myParagraph)
var newHeight = someCalculation(textBox) //Is that posible?
textBox.property('Source Text').value.boxTextSize = [600, newHeight]

 

From what I have seen, there is no property that determines the number of lines, or some other information with which I can calculate the height, only the size of the character in pixels. Is there any way or some property from which I can calculate the height of the box?


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>