# Font size according to field area

**URL:** https://forum.kirupa.com/t/font-size-according-to-field-area/637512
**Category:** flash
**Created:** [November 26, 2017, 3:59pm UTC](https://forum.kirupa.com/t/font-size-according-to-field-area/637512 "2017-11-26T15:59:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![erezb1](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@erezb1](https://forum.kirupa.com/u/erezb1)
#### Post date: [November 26, 2017, 3:59pm UTC](https://forum.kirupa.com/t/font-size-according-to-field-area/637512/1 "2017-11-26T15:59:58Z")

</div>

Hi All

Got a dynamic text box which get text from outer source, (fits to 20 chars).  
I want the whole text to keep inside the box and shrink (font size) if text is too long.  
Tried all of this options, none of them shirk the font size:(instance name=boxer)

```auto
//boxer.autoSize = TextFieldAutoSize.CENTER;
//boxer.wordWrap = true;
//boxer.width = 100;
//boxer.textWidth = 100;
//boxer.autoSize = "CENTER";
//boxer.scaleX = 1;
//boxer.multiline = false;
//boxer.textWidth
//boxer.textWidth = boxer.width;

```

Is there a simple code telling the text to stay in the text box and shirk its size ?

Thanks
