# Embedding Dynamic Fonts

**URL:** <https://forum.kirupa.com/t/embedding-dynamic-fonts/276754>\
**Category:** flash\
**Created:** [December 3, 2008, 10:20am UTC](https://forum.kirupa.com/t/embedding-dynamic-fonts/276754 "2008-12-03T10:20:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnan794](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@adnan794](https://forum.kirupa.com/u/adnan794)\
**Post date:** [December 3, 2008, 10:20am UTC](https://forum.kirupa.com/t/embedding-dynamic-fonts/276754/1 "2008-12-03T10:20:36Z")

</div>

Hello

I am Trying to load fonts dynamically from an XML file the code is working fine if I am using it directly on the timeline.

```auto

*var myFont:Font = new Font1();
var textFormat:TextFormat = new TextFormat();
textFormat.font = myFont.fontName;
textFormat.size = 26;
var flashText:TextField = new TextField();
flashText.autoSize = TextFieldAutoSize.LEFT;
flashText.defaultTextFormat = textFormat;
flashText.embedFonts = true;
flashText.x = 25;
flashText.y = 30;
flashText.antiAliasType = AntiAliasType.ADVANCED;
flashText.text = “Text Example A”;
addChild(flashText);*
*

```

- 

\*but when I am trying to load from an XML file it does’t display anything if I remove text.embedFonts = true then I can see the font any idea about this error \*

_Thanks in advance._
