# Embedded fonts

**URL:** https://forum.kirupa.com/t/embedded-fonts/301991
**Category:** Uncategorized
**Created:** [December 18, 2009, 8:30pm UTC](https://forum.kirupa.com/t/embedded-fonts/301991 "2009-12-18T20:30:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![brunoja](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@brunoja](https://forum.kirupa.com/u/brunoja)
#### Post date: [December 18, 2009, 8:30pm UTC](https://forum.kirupa.com/t/embedded-fonts/301991/1 "2009-12-18T20:30:48Z")

</div>

Hello! I am trying to use a font here, but when it is displayed I think the display result is not very smooth :eek:

Look what I am doing to create a text field:

```auto
[Embed(source="../Rrc/Fonts/Alleg.ttf",fontFamily="Alleg")]
        private var allegFont:String;

        private static var alleg:TextFormat = new TextFormat();

        public function Depot()
        {
            alleg.size = 10;
            alleg.font = "Alleg";
        }

        static public function createTextField(text:String):TextField
        {
            var result:TextField = new TextField();
            updateTextField(result,"The quick brown fox jumped over the lazy dog.");
            return result;
        }

        static public function updateTextField(result:TextField,text:String):void
        {
            result.embedFonts = true;
            result.autoSize = TextFieldAutoSize.LEFT;
            result.antiAliasType = AntiAliasType.ADVANCED;
            result.defaultTextFormat = alleg;
            result.selectable = false;
            result.background = true;
            result.text = text;
        }

```

Yes, I instantiate somewhere the Depot class (depot = new Depot()).

Here is the result:  
 ![](http://img3.imageshack.us/img3/6838/badoo.png)  
And this is how it should be:  
 ![](http://img199.imageshack.us/img199/430/goodpn.png)

I am using a ttf font, it can be found here: [http://www.dafont.com/ernest-borgnine.font](http://www.dafont.com/ernest-borgnine.font)

Maybe I should disable anti-aliasing? I coundt find how 😕  
Thank you for help 😛
