# Using embedded fonts with TextFormat

**URL:** <https://forum.kirupa.com/t/using-embedded-fonts-with-textformat/253534>\
**Category:** flash\
**Created:** [March 2, 2008, 6:45pm UTC](https://forum.kirupa.com/t/using-embedded-fonts-with-textformat/253534 "2008-03-02T18:45:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tactics](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@tactics](https://forum.kirupa.com/u/tactics)\
**Post date:** [March 2, 2008, 6:45pm UTC](https://forum.kirupa.com/t/using-embedded-fonts-with-textformat/253534/1 "2008-03-02T18:45:25Z")

</div>

Hi folks,

Been playing around with this tutorial:

[http://www.kirupa.com/developer/actionscript/textfield.htm](http://www.kirupa.com/developer/actionscript/textfield.htm)

It works great, but I can’t figure out how to change the font in the textbox using an embedded font.

I imported a new font into the library and named it “marriage”. I also selected the export options. But the following doesn’t work as expected:

format = new TextFormat();  
format.font = “marriage”;  
tfield.setTextFormat(format);

Is there something else I need to do to use an embedded font? My eventual goal with this is to create a drop down menu with several fonts in it that people can use to change the font face in the text field.
