ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to use "sourceRectAtTime" expression with characters below the font baseline

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Henry Gaunt
How to use "sourceRectAtTime" expression with characters below the font baseline
on Jul 25, 2017 at 8:37:43 am

Hello cows -

I’m using this expression on a shape layers ‘rectangle path 1’

s=thisComp.layer("THIRETEEN");
padding = 60;
x=s.sourceRectAtTime(time-s.inPoint,true).width;
y=s.sourceRectAtTime(time-s.inPoint,true).height;
content("Rectangle 1").content("Rectangle Path 1").size/2;
[x+padding,y+padding]


It works perfectly.

However, when my text layer has a ‘,’ (comma) in it, the whole box increases in size all the way around. Almost like a 10px stroke is being added.

It affects any character that sits below the text base line. e.g.; q, y, p - I’ve solved it by using upper case, but the comma is still persistent.

Is there a reason for this?

Thank you for any help.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]