0 Replies Latest reply on Sep 30, 2009 12:29 AM by atraikov

    Download cyrillic embeded fonts



      first pardon my week english. I have this issue when I try to download swf, containing a font class everything is ok. I'm registering it in the font register and using it afterwards, but I cannot type cyrillic glyphs. They just don't show. How can I fix this, having in mind that I'm using Actionscript 3 and compiling it for Flash Player 9. Here is a portion of the code.


      //here is the class constructor:

      public function editorFontLoader( fontInfo:Array, fontId:String = '' ){
                  //nazna4avane na glavnite stoinosti
                  this.fontInfo = fontInfo;
                  this.fontId = fontId;
                  //zapo4vane na zarejdaneto
                  this.loader = new Loader();
                  var context:LoaderContext = new LoaderContext(); //osigurqva dopylnitelna informaciq za Loader-a
                   context.applicationDomain = ApplicationDomain.currentDomain; //osigurqvame si dostyp do vsi4ki klasove na Loader-a
                   this.loader.load( new URLRequest( this.fontInfo[1] ), context );


      //here is the function called by event

      private function completeHandler( e:Event ){


                  //vzimame klasa na 6rifta
                  var embeddedFontClass:Class = loader.contentLoaderInfo.applicationDomain.getDefinition( this.setFontDefinition( this.fontInfo[0] ) ) as Class;
                  Font.registerFont(embeddedFontClass); //registrirame klasa
                  var embeddedFontsArray:Array = Font.enumerateFonts(false); //vzimame spisyka s 6riftove
                  for( var key in embeddedFontsArray ){


                      if( embeddedFontsArray[key].fontName == this.fontInfo[0] ){
                          this.embeddedFont = embeddedFontsArray[key];
                  dispatchEvent(new Event(editorFontLoader.FONT_LOADED));


      //after that I'm applyig the font with this function

      public function setFont( data:Object ){


                  var myFormat:TextFormat = new TextFormat();
                  for( var i in data){
                      if( i != 'tfObject' ){
                          myFormat[i] = data[i];
                  data.tfObject.setTextFormat( myFormat );