# Change font in dynamic text field

**URL:** <https://forum.kirupa.com/t/change-font-in-dynamic-text-field/303228>\
**Category:** Uncategorized\
**Created:** [January 17, 2010, 12:57am UTC](https://forum.kirupa.com/t/change-font-in-dynamic-text-field/303228 "2010-01-17T00:57:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phastings](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@phastings](https://forum.kirupa.com/u/phastings)\
**Post date:** [January 17, 2010, 12:57am UTC](https://forum.kirupa.com/t/change-font-in-dynamic-text-field/303228/1 "2010-01-17T00:57:32Z")

</div>

i’ve search for this but i’m still having a problem. i have a textfield on the stage and i want to change the font it’s displaying on rollover(i want to just have the font go bold but the font doesn’t have a bold option so i need to change it). here is what i’m calling:

public function mouseOverMenu(e:Event):void {  
trace(“MOUSE OVER test:”+e.target.textTxt.text);  
[//TweenMax.to](https://TweenMax.to)(e.target, 0.2, {tint:0xff0000});

```
        var boldText:TextFormat = new TextFormat();
        boldText.font="Font1";
        boldText.color=0xff0000;
        boldText.size = 32;
        e.target.textTxt.embedFonts=true;
        e.target.textTxt.text="hello";            

    
        e.target.textTxt.setTextFormat(boldText);
    }

```

Font1 is a font i’ve embeded in the library. It’s set to export and that is the name it’s set to. If i comment out the boldText.font line the other formatting works but with it the text disapears. Any clue how to fix this issue?
