# Embed fonts in dynamic TLF textfied which is created during runtime!

**URL:** <https://forum.kirupa.com/t/embed-fonts-in-dynamic-tlf-textfied-which-is-created-during-runtime/323757>\
**Category:** Uncategorized\
**Created:** [July 15, 2011, 4:27pm UTC](https://forum.kirupa.com/t/embed-fonts-in-dynamic-tlf-textfied-which-is-created-during-runtime/323757 "2011-07-15T16:27:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pnsrinivasreddy](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pnsrinivasreddy](https://forum.kirupa.com/u/pnsrinivasreddy)\
**Post date:** [July 15, 2011, 4:27pm UTC](https://forum.kirupa.com/t/embed-fonts-in-dynamic-tlf-textfied-which-is-created-during-runtime/323757/1 "2011-07-15T16:27:53Z")

</div>

Hi Experts,

I have two TLF textfileds in my application. The first TLF textfield is on the stage and the second one is created dynamically during runtime. Now I am able to embed the fonts in the first TLF textfield by using “use device fonts” since it is on stage. The flash player the rendering the data absolutely fine. I want to get the same look and feel for the second TLF textfield which is created dynamically during runtime. I tried so many ways. But it still seems ugly. Please help me out.

**Here is the code I am trying.**

```
        var fmt:TextFormat = new TextFormat(); //Text Format
        fmt.color = 0x000000;
        fmt.font = "Verdana";
        fmt.size = 14;
        fmt.align="left";
        fmt.bold = true;
        
        txt.defaultTextFormat = fmt; //txt is a textfield which is on stage
        txt.text = e.target.xml..textField_stage;//textField_stage is a node in the xml
        txt.wordWrap = true;
        
        var tlf:TLFTextField=new TLFTextField();
        tlf.x = 80;
        tlf.y= 80;
        tlf.width = 290;
        tlf.height = 200;
        tlf.selectable=false;
        tlf.mouseEnabled=false;
        tlf.mouseChildren=false;
        tlf.wordWrap = true;
        addChild(tlf);
        tlf.defaultTextFormat = fmt;
        tlf.text = e.target.xml..textField_runtime; //textField_runtime is a node in the xml

```

Thanks for your help,  
srinivas
