Reputation: 13079
Is there a way to create embedded "pure as3" swf fonts using compc (without the flex framework integration)? If I embed a font like this in my as3:
package fonts
{
import flash.display.Sprite;
import flash.text.Font;
public class Helvetica extends Sprite
{
[Embed(source='Helvetica.otf', fontName='Helvetica')]
public static var Helvetica :Class;
Font.registerFont( Helvetica );
}
}
using compc.exe -compiler.keep-generated-actionscript=true
I see flex makes some boilerplate as3 code including things like this:
import mx.core.IFlexModule;
import mx.core.IFlexModuleFactory;
import mx.core.EmbeddedFontRegistry;
which prevents me from using the embedded font in "pure as3" projects. Is there a way to get flex-free fonts using compc?
I am hoping there is an easy solution like this one for Bitmap Assets.
Upvotes: 0
Views: 1258
Reputation: 15623
well, i think the method disrribed should work anyhow ... you just got to replace few more classes ... probably EmbeddedFontRegistry
, so it won't have any dependancies ... just stuff in an empty method ...
greetz
back2dos
Upvotes: 2