# Embedded font in TextField.htmlText

**URL:** https://forum.kirupa.com/t/embedded-font-in-textfield-htmltext/297039
**Category:** flash
**Created:** [September 24, 2009, 4:01pm UTC](https://forum.kirupa.com/t/embedded-font-in-textfield-htmltext/297039 "2009-09-24T16:01:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ar34z](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@ar34z](https://forum.kirupa.com/u/ar34z)
#### Post date: [September 24, 2009, 4:01pm UTC](https://forum.kirupa.com/t/embedded-font-in-textfield-htmltext/297039/1 "2009-09-24T16:01:50Z")

</div>

Hi,

I’ve been searching all day and haven’t found a proper solution for this.  
I have 3 embedded fonts in my library and I have given them a class name.

Now I would like to use these fonts in HTML in a TextField object.  
How do I do this? I created a stylesheet and entered the font name, but  
it still picks it from my harddrive, because it doesn’t work on other computers  
where the font is not installed.

I have a font embedded named “Edo”, and gave it the classname Edo.

```auto

   styleSheet = new StyleSheet();
   var body:Object = new Object;
   body.fontFamily = Font(new Edo()).fontName;
   body.fontSize = "12px";
   body.color = "#ff0000";
   body.fontStyle = "italic";
   styleSheet.setStyle("body", body);
   textField.styleSheet = styleSheet;
   textField.htmlText = "<body><i>asfdasfdasdf</i></body>";

```

Yet, it shows up as Times New Roman on PC’s without the font.  
Can anybody help?
