1 Reply Latest reply on May 11, 2010 5:00 AM by Karl_Sigiscar_1971

    Using italics within Htmltext with embedded fonts

    what_is_love

      hi there guys, I've been trying to use embedded fonts within my htmlText. However, it seems like it only shows the bold/normal fonts and it ignores the italics. The italics part of htmlText shows up as normal weight/ normal style font.

       

      Here's what I am doing (am i doing anything wrong?):

       

      I embed my fonts within a .css file:

       

      @font-face {
          src: local("Verdana");
          fontFamily: myFontFamily;
          advancedAntiAliasing: true;
          fontWeight: bold;
          fontStyle: italic;
      }

       

      @font-face {
          src: local("Verdana");
          fontFamily: myFontFamily;
          advancedAntiAliasing: true;
          fontWeight: normal;
          fontStyle: italic;
      }
      @font-face {
          src: local("Verdana");
          fontFamily: myFontFamily;
          advancedAntiAliasing: true;
          fontWeight: normal;
          fontStyle: normal;
      }
      @font-face {
          src: local("Verdana");
          fontFamily: myFontFamily;
          advancedAntiAliasing: true;
          fontWeight: bold;
          fontStyle: normal;
      }

       

      Then i use it within this Text component:

       

        <mx:Text width="100%" color="blue" fontFamily="myFontFamily" f>
              <mx:htmlText>
                  <![CDATA[
                      <font color="#000000" size="10">This text is 10 point black, <i>italic</i>, and <b>bold</b>.</font>
                  ]]>
              </mx:htmlText>
          </mx:Text>