3 Replies Latest reply on Apr 12, 2009 1:12 AM by ergo_eleven

    Stylename have bold or italic,how can I know

    FangAvatar Level 1

      Hi All,

       

      I am using embedded font in my code.Suppose i have default Arial with bold,italic and bold-italic style.How can i know by a style name have bold or italic?

      I'm using EmbeddedFontRegistry but its not works in me.

       

      Please advice me.Thanks.

        • 1. Re: Stylename have bold or italic,how can I know
          Michael Borbor Level 4

          I guess you could use getStyle("fontSize")  to find out.

          • 2. Re: Stylename have bold or italic,how can I know
            FangAvatar Level 1

            No No,suppose i have style name .palinArial.

                .myPlainStyle {
                    fontFamily: myFont;
                    /* fontSize: 14; */
                 }
                 .myItalicStyle {
                    fontFamily: myFont;
                   /*  fontSize: 14; */
                    fontStyle: italic;
                 }
                 .myBoldStyle {
                    fontFamily: myFont;
                    /* fontSize: 14; */
                    fontWeight: bold;
                 }
                 .myItalicBoldStyle {
                    fontFamily: myFont;
                    /* FONTSIZE: 14; */
                    fontStyle: italic;
                    fontWeight: bold;
                 }
                 .myPlainStylever {
                    fontFamily: myFont1;
                    /* fontSize: 14; */
                 }    

             

            I have changed the style .plainver.In my mxml file i embed the styles.Suppose the verdana ttf have no bold font.After changing the style i want to click on bold option.in this funtion i should know what style contain the .plainver.How can I know?

            • 3. Re: Stylename have bold or italic,how can I know
              ergo_eleven Level 1

              var s : String = StyleManager.getStyleDeclaration(".myPlainStylever").getStyle("fontWeight");

              trace(s);