Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Countdown timer with a non-monospace font

  • Countdown timer with a non-monospace font

    Posted by Ralph Vidal on September 25, 2014 at 6:55 am

    I’m currently using a monospace font for the timer I’m creating, but I was asked to change the font to something else. The font requested happens to be a non-monospace font, so now the numbers are moving around. I’m new with expressions, so I’m not sure how to keep the numbers from moving as they count down. Below is the expression I’m working with.

    countdown = 60-Math.floor(time); if (countdown < 10) {"0" + countdown} else countdown

    Ralph Vidal replied 12 years ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 25, 2014 at 2:07 pm

    I guess you’d have to put each digit in a separate layer, with this for the left digit:

    countdown = 60-Math.floor(time);
    if (countdown < 10) “0” else Math.floor(countdown/10)

    and this for the right digit:

    countdown = 60-Math.floor(time);
    countdown % 10

    Dan

  • Kevin Camp

    September 25, 2014 at 11:42 pm

    also, the numbers effect has an option to disable proportional spacing…

    i’ve always thought there should be an option in the characters panel to toggle between mono-space and proportional spacing.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Ralph Vidal

    September 26, 2014 at 3:13 am

    Thanks Dan! That worked perfectly.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy