# Embedding fonts

**URL:** https://forum.kirupa.com/t/embedding-fonts/307781
**Category:** Uncategorized
**Created:** [April 10, 2010, 3:55am UTC](https://forum.kirupa.com/t/embedding-fonts/307781 "2010-04-10T03:55:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mrpercival](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mrpercival](https://forum.kirupa.com/u/mrpercival)
#### Post date: [April 10, 2010, 3:55am UTC](https://forum.kirupa.com/t/embedding-fonts/307781/1 "2010-04-10T03:55:00Z")

</div>

I have added a textarea component to my flash project, its instanceName is set.

I have also added a font to my library, set the font, font size, export for actionscript is checked, class listed and base class set to flash.text.Font

In as3 I have added the following code to try and embed the font.

```auto

var myriad:Font = new MyriadPro();
var tf:TextFormat = new TextFormat();
tf.font=myriad.fontName;
tf.size:14;

sResults.setStyle("textFormat",tf);

```

On my mac that I am developing on, it shows the correct font. When I load the swf on a Win Xp machine, the font used is not the one I embedded.

can someone tell me what I have missed in the embedding? I have checked that the class name matches the “new MyriadPro” and that all the variables are correctly spelled and cased.

So I am not sure what it is I am missing.

Thanks for the help!
