0 Replies Latest reply on Nov 18, 2009 6:10 PM by GordonSmith

    [svn:fx-trunk] 11970: Improved FTETextField's placement of TextLines.

    GordonSmith Level 4

      Revision: 11970

      Revision: 11970

      Author:   gosmith@adobe.com

      Date:     2009-11-18 18:10:30 -0800 (Wed, 18 Nov 2009)

      Log Message:


      Improved FTETextField's placement of TextLines.


      When composing TextLines for the 'text' property, and when computing the TextLineMetrics returned by getLineMetrics(), we now calculate the ascent slightly differently, and round the leading.


      When composing TextLines for the 'htmlText' property, we now use a new TLF LeadingModel called APPROXIMATE_TEXT_FIELD.


      With the combination of these two changes, we can now get the exact same line placement for multiple lines of Arial 12 (Flex's default font) on Windows for (1) text in TextField, (2) text in FTETextField, (3) htmlText in TextField, and (4) htmlText in FTETextField.


      For other fonts and sizes, there may be small differences between TextField and FTETextField, because FTE does not have access to TextField's metrics; we're using a hueristic that TextField's ascent is aproxmiately FTE's ascent plus FTE's descent. But for any font, multiple lines of single-format 'htmlText' should now be spaced the same as multiple lines of 'text'.


      QE notes: Baseline bitmaps involving FTETextField may need to be regenerated.

      Doc notes: None

      Bugs: None

      Reviewer: Evtim

      Tests run: ant checkintests

      Is noteworthy for integration: No


      Modified Paths: