Skip navigation
SJRob
Currently Being Moderated

text exported using flash createJS Toolkit - embedding fonts, @fontface?

Dec 5, 2012 11:41 AM

Tags: #font #text #embedding #toolkit #family #createjs

Hi,

 

A text box in flash contained in a movieclip "MyTxt_mc" exported as per createJS toolkit results in lines in CreateJS script as :

 

 (lib.MyTxt_mc = function()

{ this.initialize();

//text
this.MyTxt_txt = new cjs.Text("The actual text", "30px Arial");
this.MyTxt_txt.textAlign = "center";
this.MyTxt_txt.lineHeight = 32;
this.MyTxt_txt.lineWidth = 205;
this.MyTxt_txt.setTransform(102.5,0);
this.addChild(this.MyTxt_txt,this.shape);

}

 

Is there a way to insert getting web fonts from online libraries or from a font file held on the server? As I wish to use other than Arial or default device fonts.

 

I've read up about @fontface, but that's a little puzzling as to how to apply it to the flash - html5 output.

 

Help for how to / best approach and exact syntax would be greatly appreciated.

 

Regards

 

Steve

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points