# Problem with EmbedFonts

**URL:** https://forum.kirupa.com/t/problem-with-embedfonts/192598
**Category:** flash
**Created:** [June 29, 2006, 5:18pm UTC](https://forum.kirupa.com/t/problem-with-embedfonts/192598 "2006-06-29T17:18:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)
#### Post date: [June 29, 2006, 5:18pm UTC](https://forum.kirupa.com/t/problem-with-embedfonts/192598/1 "2006-06-29T17:18:10Z")

</div>

Hello all,

I am having a problem using embedFonts. It just won’t work. At first I thought it was something in my code, but it seems to be working fine except for the embed. So I went through the help doc on it and even using the example code it won’t work. I am guessing it must be how I am setting up the font in the library. So here is what I am doing.

In the library, I select New Font… I name the font Pakt an choose the font I am using which is Pakt-Black. Then I use this code:

```
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] my_fmt:[COLOR=#0000FF]TextFormat[/COLOR] = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]TextFormat[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

my\_fmt.[COLOR=#0000FF]font[/COLOR] = [COLOR=#FF0000]“Pakt”[/COLOR];

[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“my\_txt”[/COLOR], [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]160[/COLOR], [COLOR=#000080]120[/COLOR][COLOR=#000000])[/COLOR];  
my\_txt.[COLOR=#0000FF]wordWrap[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
my\_txt.[COLOR=#0000FF]embedFonts[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
my\_txt.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]“Hello world”[/COLOR];  
my\_txt.[COLOR=#0000FF]setTextFormat[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]  
[/FONT]

Nothing. So I comment out the embedFonts and the setTextFormat and everything works. So what am I doing wrong here? Thanks!
