2 Replies Latest reply on Dec 8, 2011 2:51 AM by wcollins3

    htmlText can't use embedded font via inline <font face=xxxx></font> tag


      I'm using an mx:TextArea control to display some legacy HTML data from my client.  The HTML that I'm trying to display includes content like this:


      Here is some normal text.  <font face="myfont">Here is some text using an embedded font.</font>


      The problem is that the inline font face property isn't able to find the embedded font, and uses the default font (Arial) instead.


      I'm sure the font is properly embedded in my Flex app because if I set the mx:TextArea's fontFamily="myfont" it shows the entire HTML content using the embedded font (which is not installed on my system).  Of course, this defeats the purpose of using the inline <font> tag, allowing me to use multiple fonts inside the mx:TextArea control.


      I'm using FB 4.5.1, and Flex SDK 4.5.1.


      Can anyone help?


      -------- note added later:


      I have also tried the same test using a s:RichEditableText control.  Here is my code:


      retHtml.textFlow = flashx.textLayout.conversion.TextConverter.importToFlow(

           "Here is some normal text. <font face='myfont'>Here is some text using an embedded font.</font>",



      Unfortunately I'm seeing the same problem when using the s:RichEditableText control as above when using mx:TextArea.  If I change 'myfont' to a different font that's installed on my system it works as expected.  However, when using the embedded 'myfont' it doesn't work, even though if I add the following:


      retHtml.textFlow.fontFamily = "myfont";


      ... it again shows that myfont is indeed embedded properly.