Skip to main content
tnbnicer
Inspiring
May 10, 2019
Question

Animate to Canvas Webfont fallback option

  • May 10, 2019
  • 0 replies
  • 197 views

Hello.

This will be two questions.

Question A)

I'm embedding a Google Font in my animation for Canvas. Because I use Cloudflare, which caches fonts, I keep the font, PT Sans Caption, in a folder on the server on the same domain. Fortunately the animation doesn't need the font immediately. It runs for a few seconds first. I load the font in CSS, @11220649-face and no JS.

Is that recommended though? If something were to go wrong? The loader script can check if a font has loaded, while it does not appear to invoke a fallback font.

If 'PT Sans Caption' is available,

this.object = new cjs.Text("my text", "normal 400 11px 'PT Sans Caption'", "#416263");

otherwise,

this.object = new cjs.Text("my text", "normal 400 11px 'Verdana'", "#416263");

Are there instructions for embedding a fallback font?

My other question)
What happens to embedded Adobe Fonts in the event that a Creative Cloud subscription ends? Does the font link expire online in an active animation?

A correct answer to question A scores ten points. Thanks.

This topic has been closed for replies.