# Text Areas and Font Sizes

**URL:** https://forum.kirupa.com/t/text-areas-and-font-sizes/238740
**Category:** flash
**Created:** [September 14, 2007, 2:37pm UTC](https://forum.kirupa.com/t/text-areas-and-font-sizes/238740 "2007-09-14T14:37:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)
#### Post date: [September 14, 2007, 2:37pm UTC](https://forum.kirupa.com/t/text-areas-and-font-sizes/238740/1 "2007-09-14T14:37:14Z")

</div>

Hey guys.

Working on a project right now and I’d like to make a certain aspect of it as flexible as possible. Basically here’s the scoop.  
[LIST]  
[_]We have a bunch of text areas but we’ll focus on one  
[_]User fills out input text area (Font size 11 pt, multiline text area but we only want 1 line to be filled out)  
[_]On submit I check the height of the text area (If the height is greater then the equivalent to one line I throw and error message - we don’t want to use character count)  
[_]If all is ok the input the user typed goes into a dynamic text area for display(Font size 26)[/LIST]What I would love to do here is basically fill out a few variables

for example  
ActionScript Code:  
[FONT=Courier New][LEFT]dynamic\_txt\_font\_size = [COLOR=#000080]26[/COLOR];  
dynamic\_txt\_allowed\_width = [COLOR=#000080]150[/COLOR];  
[/LEFT]  
[/FONT]

And automatically resize the input text area’s width accordingly. This way it makes sense to the user how much type the can fill out visually. The way I am currently doing this is hard coding the width of the input text area which works fine but I’d like to automate this.

So the real question at hand I guess is how would I figure out the aspect ratio based on font size?

I hope I have been clear

Thanks
