5 Replies Latest reply on Aug 22, 2012 11:34 PM by Flex harUI

    Fonts Problem

    flex_star Level 1

           Hi All


             For my web application i have to use more than 200 fonts. Currently i am embeding it through flash and using that swf. but this way for embedding makes the main,swf size bigger .



      I am using style manager to load that swf at run time .


        Is this the correct way to use fonts for web app or any other way pls help me.. Im in trouble

        • 1. Re: Fonts Problem
          Flex harUI Adobe Employee

          Most folks load individual fonts via loadStyleDeclarations or as regular modules.  Neither should be inflating the main swf in any significant way.

          • 2. Re: Fonts Problem
            flex_star Level 1



                If any examples please provide (it might be more helpful).. right now i am loading fonts through embedded swf via flash cs4 .

                 The fonts should load like this


            • 4. Re: Fonts Problem
              flex_star Level 1

              Thanks a lot ... I have been using same way to load fonts ...

              My another clarification is there.... right now i am assigning these fonts for RichEditable Text  but Same way i used the fonts for UITextfield but these fonts are not supporting.


              For UItextField I am assigning fonts through Textfomat.

              I am Embedding font in swf

              [Embed(source = "assets/fonts/arcfont.swf", fontName = "Arial")]

                                  private var Arialcls:Class;


              By using the Arialcls


              var str:Object            =   new Arialcls().fontName;

              public var _textFormat:TextFormat;

              _textFormat.align     = TextFormatAlign.CENTER;

                                                      _textFormat.font    = str;

                                                      _textFormat.size    = _fontsize;

                                                      _textFormat.color  = _fontColor;



              After assigning fonts to textfomat i am assigning to UiTextField

              var field:UITextField  = new UITextField();

              field.defaultTextFormat  = _textFormat;

                                            field.embedFonts                     = true;


                                            field.multiline                      = false;




              but instead i need to load fonts loaded dynamically through



              for  UITextField... 


              Pls Help it ll be useful for me a lot

              • 5. Re: Fonts Problem
                Flex harUI Adobe Employee

                See the embedded fonts article on my blog.



                Alex Harui

                Flex SDK Team

                Adobe Systems, Inc.