0 Replies Latest reply on Aug 1, 2013 9:01 AM by pfcu4glf

    How to get accurate line widths from TextBlock.CreateTextLine

    pfcu4glf Level 1

      I am writing a Flex 4 application where text has to fit inside a bounding box, at the largest font size possible where the text fits inside the box. The text is word wrapped.  My program iterates until it finds the largest point size that the text fits inside the box. I am using TextBlock.CreateTextLine to word wrap the text.  However the line widths returned can be smaller than the actual width of the text when Flash renders it, particularly for slanted fonts. Is there any way to get the actual bounding box of the text in each TextLine - without actually rendering the text?  (I'm suspecting that the width that is returned does not include the left side bearing of the left most character)