3 Replies Latest reply on Feb 20, 2014 5:42 AM by Sarah Northway

    Are italic tags broken in Flash CC? Bug?

    Sarah Northway Level 1

      I noticed that my <i> italic tags stopped working when I switched from CS6 to CC. If I create a fresh FLA, add a dynamic TextField, embed both Arial Regular and Arial Italic, then do this:

       

      two.htmlText = "These are BR tags: <br/><br /><i>this is in an italic tag</i> and this is not.";

       

      I will see the BR line breaks, but the italic tag has no effect.

       

      I tried using <FONT FACE="Arial Italic"> instead of the <i> tag, and that works. I had no luck using CSS. I'm not sure if I'm just having a brain fart, or the specs have changed, or if this is a real bug. Can someone tell me what's going on? Here's my test:

       

      https://dl.dropboxusercontent.com/u/11786661/ItalicsTest.zip

        • 1. Re: Are italic tags broken in Flash CC? Bug?
          sinious Most Valuable Participant

          Verifying I get the same results. I embedded Comic Sans MS and the only way I could get it to render was removing embed fonts (embedFont = false). However internally it was working as expected, albeit a tad less smooth.

           

          Simple way to verify, open a new document and embed any font in the library, then export for ActionScript and name the class "CSMS" (for this example to work).

           

          Paste in frame 1:

           

          import flash.text.TextFormat;

          import flash.text.TextField;

          import flash.text.Font;

          import flash.text.AntiAliasType;

           

          // I embedded comic sans ms, exported for actionscript as "CSMS"

          var f:Font = new CSMS();

           

          var tf:TextFormat = new TextFormat(f.fontName,30,0x0);

           

          var tx:TextField = new TextField();

          addChild(tx);

          tx.x = tx.y = 20;

          tx.width = 300;

          tx.height = 300;

          tx.wordWrap = true;

          tx.antiAliasType = AntiAliasType.ADVANCED;

          tx.defaultTextFormat = tf;

          tx.htmlText = "This is Regular. <i>This is italic</i>. <b>This is Bold</b>.";

           

          Despite there being no italic version to embed, and I didn't even embed bold, they still work. You can verify it by changing the font embedded to any other font and you should see your rendered text properly.

           

          Example of Comic Sans MS:

           

          font1.png

           

          Tahoma:

           

          font2.png

           

          Times New Roman:

           

          font3.png

           

          The second I check to embed or programmatically set it the text disobeys. The fact that the font is changing when I set the same embedded font to different families with is programmatically applied says some level of the embedding is working, even if it's simply mappying to your OS's fonts.

          1 person found this helpful
          • 2. Re: Are italic tags broken in Flash CC? Bug?
            kglad Adobe Community Professional & MVP

            i also see the same problem using an embedded font via the ide properties panel, using textformat and using stylesheets.

            1 person found this helpful
            • 3. Re: Are italic tags broken in Flash CC? Bug?
              Sarah Northway Level 1

              Good to hear I'm not nuts. I reported this at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform.This is like the 5th flash/air bug I've reported that had something to do with fonts. I'm guessing it's either a hard problem, or Adobe keeps assigning co-op students to work on it.

               

              At least there is a workaround: use the FONT tag instead eg <FONT FACE="Arial Italic">this is italic</FONT>

               

              I haven't tried embedding the fonts programatically, but that may also work.