2 Replies Latest reply on Nov 10, 2011 10:11 PM by Flex harUI

    Flex 4.5 - TextFlow CSS Embedded Fonts


      We're loading html formatted text dynamically from a resource bundle and using the textflow attribute of a RichText element. When we try and apply any of our styles or use the embedded fonts from our stylesheet they seem to never work.


      Is there a trick to using CSS embedded fonts with the TextFlow items?

        • 1. Re: Flex 4.5 - TextFlow CSS Embedded Fonts
          supersonicecho Level 2

          I don't know if this will be helpful but I had a hell of a time trying to get embedded fonts on FTE text and I noticed 2 things that may be interesting to you:


          A) FTETextField objects would actually render using the embedded fonts, set via a TextFormat object, and

          B) UITextField objects would not render using the embedded font UNLESS I set the fontFamily for the containing component to the embedded font.


          E.G., if the UITextField was contained within a UIComponent, unless I called UIComponent.setStyle('fontFamily', 'crazyFont'), it wouldn't apply the font to the UITextField. 


          Try setting the fontFamily on the RichText element to the font you want to use and then set the styles on the TextFlow object. See if that helps.

          • 2. Re: Flex 4.5 - TextFlow CSS Embedded Fonts
            Flex harUI Adobe Employee

            See the embedded fonts post on my blog for details on how this stuff works.



            Alex Harui

            Flex SDK Team

            Adobe System, Inc.