# Dynamic fonts don't work... but Arial and Verdana work

**URL:** <https://forum.kirupa.com/t/dynamic-fonts-dont-work-but-arial-and-verdana-work/327675>\
**Category:** flash\
**Created:** [March 19, 2012, 2:46pm UTC](https://forum.kirupa.com/t/dynamic-fonts-dont-work-but-arial-and-verdana-work/327675 "2012-03-19T14:46:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [March 19, 2012, 2:46pm UTC](https://forum.kirupa.com/t/dynamic-fonts-dont-work-but-arial-and-verdana-work/327675/1 "2012-03-19T14:46:26Z")

</div>

Hi,  
I am trying to defeat my psychological block with dynamically loaded fonts in AS3, and I have an annoying problem. I am creating a clock with a textfield and I am loading fonts from a SWF library: the available classes/linkages are “Arial”, “ArialBold”, “MyriadPro”, “MyriadProBold” and “Verdana”.

This is the line where I get the class from the SWF, and it extracts the class correctly

```auto
clock = new Clock( { fontClass: assetsLoader.getFontClass("skin", "Arial") } );

```

The constructor…

```auto
public function Clock(_clockProperties : Object) {
   Font.registerFont(_clockProperties.fontClass);
   
   clockFormat = new TextFormat();
   clockFormat.size = 20;
   clockFormat.color = 0xFFFFFF;
   clockFormat.align = TextFormatAlign.CENTER;
   clockFormat.font = getQualifiedClassName(_clockProperties.fontClass);
   trace("FONT CLASS = " + getQualifiedClassName(_clockProperties.fontClass));
   
   clockTextField.multiline = false;
   clockTextField.wordWrap = false;
   clockTextField.selectable = false;
   clockTextField.embedFonts = true;
   clockTextField.antiAliasType = AntiAliasType.ADVANCED;
   clockTextField.type = TextFieldType.DYNAMIC;
   clockTextField.width = 200;
   clockTextField.height = 40;
   clockTextField.defaultTextFormat = clockFormat;
   
   this.addChild(clockTextField);
   setActualTime(clockProperties.withSeconds);
  }

...

```

Now, if I use “Arial” and “Verdana” this works correctly, I see the clock, but if I use “ArialBold”, “MyriadPro” or “MyriadProBold” I can’t see anything, just the output “FONT CLASS = MyriadPro” that tells me that the font has been loaded.

Why do I see 2 fonts on 5?!

Am I registering the fonts in the wrong domain? I am loading the SWF with Greensock SWFLoader, specifying the loader context “new LoaderContext(false, ApplicationDomain.currentDomain)”
