What is the result on the Mac? Do you get the same result on Mac and Win if you embed the font?
- Gordon ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rozhkovalexey Sent: Wednesday, November 29, 2006 5:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Different font height on Mac and Win. 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 <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?