TEXT DYNAMIZATION

CUSTOMIZE FONTS

Documentation DCO Enabler -> ENABLER ADOBE ANIMATE CC -> CUSTOMIZE FONTS

CUSTOMIZING WEB FONTS

Adobe Animate cc allows you to manage web fonts with Adobe typeKit and Google Fonts.

Nevertheless for a digital advertising campaign, we do not recommend to call fonts online (security problems, scalability. …).

We also recommend that you don’t choose too heavy fonts (recommended weight <50 ko) and favor loading your fonts locally.

Export your HTML Template, edit it and add the following code just before the closing tag </head>:

<style>
@font-face { 
 font-family: 'FrancoisOne-Regular'; 
 src: url('fonts/FrancoisOne-Regular.woff2');
 font-weight: normal; 
} 
@font-face { 
 font-family: 'Covered By Your Grace';
 src: url('fonts/CoveredByYourGrace.woff2'); 
 font-weight: normal; 
} 

@font-face { 
 font-family: 'JosefinSlab-Italic'; 
 src: url('fonts/JosefinSlab-Italic.woff2'); 
 font-weight: normal; 
}
</style>
<link rel="preload" as="font" href="fonts/FrancoisOne-Regular.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="fonts/CoveredByYourGrace.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="fonts/JosefinSlab-Italic.woff2" type="font/woff2" crossorigin="anonymous">

After completing this step, reload the HTML Template (Publish Settings-> Advanced-> Import New).

Once the fonts are loaded, you can apply the custom font to the textField (s):

ADventori.Display.setFont(this.textField,);

You can also add the name of your font to the methods of adding text:

ADventori.Display.setText(this.textField,ADventori.data.wording,);
ADventori.Display.adaptText(this.textField,14,200,200,);
ADventori.Display.setAndAdaptText(this.textField,ADventori.data.wording,14,200,200,);

Result :