Hi Alex, thanks for the reply.
It seems that it appears only when font is embedded. Also, I noticed that when text-align is set to right, the textwidth of the text increases. For ex. if the textWidth of the UItextField is 460 when the text-align is left, it increases to 480 as soon as text-align is set to right. I filed this bug on bugs.adobe. Fololowing is the location. http://bugs.adobe.com/jira/browse/FP-3471 -- Mahesh KOkadwar --- In [email protected], Alex Harui <aha...@...> wrote: > > There might be some edge cases out there. Does it work if you don't embed > the font? Maybe file a bug with your test case. > > Alex Harui > Flex SDK Developer > Adobe Systems Inc.<http://www.adobe.com/> > Blog: http://blogs.adobe.com/aharui > > From: [email protected] [mailto:[email protected]] On > Behalf Of m_koks > Sent: Tuesday, December 15, 2009 4:28 AM > To: [email protected] > Subject: [flexcoders] UITextField: text-align crops the text > > > > Hi > I observed that if you set the textAlign property as right or center > to the UITextField and if the UItextField is multiline, few of the > extreme right characters in the line get cut. > > Run following code to get the issue I'm talking about. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute" creationComplete="onCreate()"> > <mx:Script> > <![CDATA[ > import mx.core.UITextField; > > private var tf1:UITextField; > [Embed(systemFont="Verdana", fontName='Verdana', > mimeType='application/x-font')] > public var verdanaFont:Class; > [Embed(systemFont="Verdana", fontName='Verdana', > fontWeight="bold", mimeType='application/x-font')] > public var verdanabFont:Class; > [Embed(systemFont="Verdana", fontName='Verdana', > fontStyle="italic", mimeType='application/x-font')] > public var verdanaiFont:Class; > [Embed(systemFont="Verdana", fontName='Verdana', > fontWeight="bold", fontStyle="italic", mimeType='application/x-font')] > public var verdanabiFont:Class; > private function onCreate():void > { > tf1 = new UITextField(); > addChild(tf1); > tf1.multiline = true; > tf1.wordWrap = true; > tf1.border = true > tf1.mouseWheelEnabled = false; > tf1.ignorePadding = false; > tf1.x = 100 > tf1.selectable = true; > tf1.width = 220 > tf1.htmlText = "nnnn nnnnnn nnnnn nnnnnnnn nnnnn > nnnnnnnn nnnnn nnnn dfw sdf gsd fg dsfg dsf sfa dsf gsd fg sdfg sdfg > sdfg sdfg sdf gsd fg sdfg sgh dffgh dfgh dfgh dfgh sd sdf gsdf gsd fg > sdfg sdfg sdf gsdfg sdf gsdf end" > tf1.embedFonts = true; > var txtFormat:TextFormat = new TextFormat(); > txtFormat.leftMargin = 20; > txtFormat.size = 15; > txtFormat.align = "right" > tf1.setTextFormat(txtFormat); > tf1.height = tf1.textHeight; > } > ]]> > </mx:Script> > </mx:Application> > > You will notice that the character w of the word dfw is getting cut. > Any idea, why this must be happening? > > Thanks in advance > > -- > Mahesh Kokadwar >

