Hi there,
When building my AS3 project using Flex SDK (2) I get the following
error...
rake aborted!
[ERROR] D:\workspace\flash\Dashboard
ComparisonChart\project\src\app\helpers\typography\Typography.as(10): col:
4: Error: Embed is only supported on classes and member variables.
[Embed(source="../../../../assets/fonts/LBIFedra-Regular.otf",
fontName="LBiFedra",
unicodeRange="U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E")];
^
I've a file that holds information for all embedded fonts called
Typography.as
It has the following relevant lines of code...
public static const FEDRA : String = "Fedra";
[Embed(source="../../../../assets/fonts/Fedra-Regular.otf",
fontName="Fedra",
unicodeRange="U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E")];
public static var Fedra : Class;
I'm calling the in a view that has a function for formatting and displaying
text...
private function createTitle() : void {
title = new TextField();
title.text = title_text;
title.antiAliasType = AntiAliasType.ADVANCED;
title.autoSize = TextFieldAutoSize.LEFT;
var tf : TextFormat = new TextFormat();
tf.size = 12;
tf.bold = true;
tf.font = Typography.FEDRA;
title.setTextFormat(tf);
addChild(title);
}
I've not managed to embed any fonts and I want them to be included at
compile-time.
Is there anything glaringly obvious that I'm doing wrongly here?
TIA
Alex.
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org