Understanding Text box math

Hello. I am trying to make a caption title template for FCP that has black text, and a grey filled box with adjustable roundness. I have it all figured out, mostly.

I have three layers, Text, "Background" (which is the bounding box for the text), and "Alignment module" which allows me to align the centers of the text layer and bounding box so that it looks nice and keeps letters like y, j, g centered in the background box when typing, instead of having it weighted towards the top.


The "Background" box Shape > Geometry > Size height and width is linked to the appropriate Text parameters (using the Link parameter) which works well. I can adjust the opacity and roundness of the box. I have the Text and Background shape layers setup to "Align To" a hidden "Alignment module" shape layer, so that it all stays pretty much centered in the background box.


Now comes the question. I have the Text > Layout set to "Paragraph" so that I can set margins. These are open captions, so we keep them relatively short to follow the speaker along quickly, and not have large lines of text on screen. The margins will also help me when we reformat for social purposes between 16x9, 9x16, and 1x1 (or whatever social flavor of the day). What I can't work out is the math of the paragraph box position, anchor point, and margins.


The paragraph box seems to count from 0 > whatever pixel from the left of the box to the right of the box. The position and anchor point properties work off of a 0,0 middle point from the center of the screen. So if I select the text tool, and drag a box to set the margins, all of the numbers between the size of the text box in pixels, and the relative position in the frame all weird to try and calculate. 3000 wide in the paragraph box is -1500 - > 1500 in the canvas.


It seems to be all working, but is there an easier way to have adjustable margins where the numbers of the position parameters are close to the numbers of the margins instead of trying to offset the difference between the 0,0 coordinate measurement, and the "count up from 0" margins?


Hopefully this is making sense.

Posted on May 28, 2025 8:17 AM

Reply
4 replies

May 28, 2025 9:00 AM in response to JeremyG

Also, since I have the Text and Background layer using an Align To behavior, and then I publish the "Alignment Module" position parameters in FCP, it makes it impossible to adjust the position of the text box, once published to fcp globally. Meaning, if I select 4 captions, I can't adjust the position of the text box using the published parameter. I can only use the Position transform globally. Is there a way to publish a parameter from Motion that would allow me to select all the captions, and adjust values globally?

May 29, 2025 2:38 PM in response to JeremyG

For Paragraph Text, there is a Ruler. In the Ruler you may set Tabs to help format the layout of the text, that's about all.


You can set Margins, but no matter how you set the margins, the Ruler always starts at 0 on the left edge. So, a (#1) Left Margin of -500, Right Margin of 500 is a width of 1000 and exactly equal to a (#2) Left Margin of 0 and a Right Margin of 1000.


Then there's the Anchor Point. For #1, an Anchor Point of X = 0 will be the horizontal center of the text box. For #2, you would need to adjust the X anchor to 500 to center the text box.


You can either set +/- distances for Right/Left margins with center value 0 or calculate the width of the margins and multiply by 0.5 to center the box.


For the Top Margin, the default is 100 which gives a 100 px. The Bottom Margin default is 0. The Text box has a physical height of 100px.


For the most part, the Top and Bottom Margins can be ... ignored. The text is going to fit regardless (unless you have Auto-Shrink to All Margins set in Layout controls.) However, if a vertical Center anchor point is required, it can be easily calculated by the height of the text Margins (top plus bottom multiplied by 0.5). You should also make sure that the Vertical Alignment is set to Center in the Text > Format > Basic Formatting controls.


Dealing with different aspect ratios is going to be problematic and you most likely have to resort to using project "Snapshots" to adjust the Margins if you're sizing the margins to the edges of whatever "social flavor" aspect you're dealing with.


One "easier" way might be to set up a Rig > Popup menu for the different aspect widths and set the margins for each — and the title/project aspect can be chosen with the dropdown menu.


However, given the outline of how you want this title to work... as "captions"... I would probably recommend against using the Paragraph layout method if possible... and if Auto-Shrink is a "must have", then set a fixed size paragraph margin set and keep the word count within a particular range... for effect. The background rectangle will not follow the margins "box" - only the text part.


For "global" adjustments to mulitple "captions", you can create an Adjustment Layer with Position parameters that can "shift" the overall layouts of all content under the Adjustment Layer... but you will need to enclose all caption Titles within a Compound Clip to separate any video "below" from the position adjustments.


If I didn't "get" the whole point, let me know.

May 30, 2025 7:27 AM in response to fox_m

You definitely got it. This has been very helpful.


Yesterday, I made a duplicate version that relied on character layout rather than paragraph and it is a bit more user friendly in terms of not having to deal with the paragraph box, but, as we know, does not constrain the text as tight as I would like, which means that in the wrong hands, the text could stretch out longer than is necessary/appropriate, since caption lines are usually fairly short to keep up with both dialogue in the piece, as well as reader.


I'll have to mess around with the tabs, as I didn't discover those in the Paragraph ruler. Also, how do I adjust or display the text box ruler after the initial text box has been created? Can't seem to find it once it's gone.

Understanding Text box math

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.