Create for example TextInput with fontFamily="TimesNewRoman", 
fontSize="14". If you run the function TextInput.measureText
(" ").ascent on Mac the result will never be 14. On Windows - all 
good.

It's problem with measureText function.
Try to run this is simple application on Mac and on Win and you will 
see what I'm speeking about.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
        <mx:Script>
                <![CDATA[
                        public function showHeight():void
                        {
                                height1.text = String
(textInput1.measureText(textInput1.text).ascent);
                                height2.text = String
(textInput2.measureText(textInput1.text).ascent);
                        }
                ]]>
        </mx:Script>
        <mx:VBox width="100%" height="100%" horizontalAlign="center">
                <mx:HBox>
                        <mx:TextInput id="textInput1" text="Test" 
fontSize="10"/>
                        <mx:Spacer width="30"/>
                        <mx:Label text="Text height"/>
                        <mx:TextInput id="height1"/>
                </mx:HBox>
                <mx:HBox>
                        <mx:TextInput id="textInput2" text="Test" 
fontFamily="TimesNewRoman" fontSize="10"/>
                        <mx:Spacer width="30"/>
                        <mx:Label text="Text height"/>
                        <mx:TextInput id="height2"/>
                </mx:HBox>
                <mx:Button label="Get height" click="showHeight()"/>
        </mx:VBox>
</mx:Application>

Anybody know how can fix this?

Reply via email to