4 Replies Latest reply on Sep 29, 2011 3:03 AM by Karl_Sigiscar_1971

    How to embed a font into Flex 4 module?

    purusothamyb Level 1


           I have a problem in embedding a font into flex 4 module.


          Here is the snipet of code I am using. The text is not renderer with the embeded font. Any flaw in my code??



                                    * Embed a font by location.






                                    private var customFont:Class;



      // Style definition


      .digitalFontStyle {


                                    fontSize: 35pt;



      // MXML code


      <s:BorderContainer borderWeight="1" cornerRadius="3" dropShadowVisible="true" minWidth="0" minHeight="0"

                                                           width="{diskContainer.width}" height="{diskContainer.height}">

                          <mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">

                                    <s:Label text="Response Time" fontWeight="bold"/>

                                    <mx:HRule width="100%"/>

                                    <s:RichText textAlign="center" styleName="digitalFontStyle" paddingTop="10">




                                              <s:span fontSize="30">







      FYI, I am using Flex 4.1.0 SDK with Cairngorm module library.


      Please help me.