# embedFonts and htmlText. How?

**URL:** <https://forum.kirupa.com/t/embedfonts-and-htmltext-how/289779>\
**Category:** flash\
**Created:** [June 4, 2009, 4:40pm UTC](https://forum.kirupa.com/t/embedfonts-and-htmltext-how/289779 "2009-06-04T16:40:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [June 4, 2009, 4:40pm UTC](https://forum.kirupa.com/t/embedfonts-and-htmltext-how/289779/1 "2009-06-04T16:40:14Z")

</div>

I am reading some CDATA text from an XML file. This text has HTML tags in it.

I want to place this text into a dynamically created textfield that has embedFonts set to true. However, when I set this to true, the html formatting doesn’t work. Instead, I only see the text without any of the formating.

Now, when I comment out my embendFonts = true statement, the html formatting works, but I loose my linked, library font. (Since the font Futura is on my machine, it stil uses a jaggy (system?) version of it, I’m assuming this would be a problem on a different machine).

Is it possible to use embedFonts with htmlText? Am I calling this stuff in the wrong order?

```auto

            copyTformat.font = myFont.fontName;
            copyTformat.size = 18;            

            var tf:TextField = new TextField();
            tf.selectable = false;
            tf.mouseEnabled = false;
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.multiline = true;
            tf.wordWrap = true;
            tf.width = 700;
            tf.defaultTextFormat = copyTformat;
            tf.embedFonts = true; // COMMENT THIS OUT, AND IT WORKS
            tf.textColor = 0xFFFFFF;
            tf.htmlText = copy;

```
