2 Replies Latest reply on Feb 25, 2010 1:00 AM by Roland684-oqZIvV

    embedding bold+italic fonts for htmlText

    Roland684-oqZIvV

      How can I embed my custom font and it's bold variant (and it's faux italic variant, because there is not real italic version) and get the b and i tags working in a htmlText field?

       

      I can use the htmlText field with system fonts (with b and i tags working) ... or I can use 1 of the embedded fonts for the whole text.

      but I can't seem to get flash to understand the bold and italic variants are also embedded.

       

      createTextField("dynamic_txt", 2, 40, 170, 350, 350);
      dynamic_txt.embedFonts = true;
      var emphatic:TextFormat = new TextFormat();
      emphatic.size = 40;
      emphatic.color = 0xFFFFFF;
      emphatic.font = "EurostileT";
      dynamic_txt.html = true;
      dynamic_txt.setNewTextFormat(emphatic);
      dynamic_txt.htmlText = "regular\n<b>bold</b>\n<i>italic</i>\n<font color='#FF0000'>red</font>";

       

      Am I missing something?