# I can't embed a font

**URL:** <https://forum.kirupa.com/t/i-cant-embed-a-font/312127>\
**Category:** Uncategorized\
**Created:** [July 26, 2010, 2:54pm UTC](https://forum.kirupa.com/t/i-cant-embed-a-font/312127 "2010-07-26T14:54:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanovics](https://avatars.discourse-cdn.com/v4/letter/i/258eb7/32.png) [@ivanovics](https://forum.kirupa.com/u/ivanovics)\
**Post date:** [July 26, 2010, 2:54pm UTC](https://forum.kirupa.com/t/i-cant-embed-a-font/312127/1 "2010-07-26T14:54:20Z")

</div>

I’ve been trying to embed a font for a long time. Here’s what i do :

```auto

           // somewhere in the Main class
           [Embed(source = '../slike/arial.ttf', fontName='Arial')]
           private var Font:Class;

           // in the constructor of Main class
           var format:TextFormat = new TextFormat();
           format.font = 'Arial';
           // format.color = 0xFF0000;
           format.size = 100;
            
           var tmp:TextField = new TextField();
           tmp.embedFonts = true;
           tmp.autoSize = TextFieldAutoSize.LEFT;
           tmp.defaultTextFormat = format;
           tmp.selectable = false;
           tmp.text = 'Neki tekst';
            
           addChild(tmp);

```

and i don’t see any text whatsoever. If i set embedFonts to false, i can see text…:mummy: help!
