Skip to main content
Participant
April 10, 2019
Answered

Problem with a dynamic text field and a webfont

  • April 10, 2019
  • 2 replies
  • 762 views

I've got a dynamic text field that I need to use to display a javascript-generated current time (24H format, hh:mm:ss) - with a custom .woff webfont. I've got the font thing working by modifying the Animate-generated code, but when I display the page in a browser, the time moves because of the different size letters.

Here's a video displaying the problem:

animate clock problem - YouTube

What do I need to change, either in the code or in Animate to get this right?

Also - another issue: in browsers other than Firefox (Chrome, Safari), the text field briefly flashes a generic serif-like font. What I do I need to do to get rid of it?

    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    Hi.

    You can also align your text field to the left.

    About the flashing, this is an issue regarding to webfonts in general, not only to Animate CC.

    Web Font Optimization  |  Web Fundamentals  |  Google Developers

    https://medium.com/@ngubanethabo.ambrose/prevent-text-font-flickering-caused-by-using-a-custom-font-family-983c4b8d548d

    Regards,

    JC

    2 replies

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    April 10, 2019

    Hi.

    You can also align your text field to the left.

    About the flashing, this is an issue regarding to webfonts in general, not only to Animate CC.

    Web Font Optimization  |  Web Fundamentals  |  Google Developers

    https://medium.com/@ngubanethabo.ambrose/prevent-text-font-flickering-caused-by-using-a-custom-font-family-983c4b8d548d

    Regards,

    JC

    Joseph Labrecque
    Community Expert
    Community Expert
    April 10, 2019

    It is likely because you are not using a monospace font?