Inline font error in Flex

I am trying to embed a font in Flex, and the code I use looks the same as in the example, but causes an error. This is the code I wrote:

[Embed(source="data/posca_mad_thrasherz/posca_mad_thrasherz.ttf",
    fontName = "fontGraffiti",
    fontWeight = "bold",
    mimeType="application/x-font")];
private var funFont:Class;

But I get the error: "Metadata requires an appropriate definition." I can’t get rid of this. Any ideas?

+3
source share
1 answer

Get rid of the semicolon at the end of your Embed statement: http://www.flash-db.com/Board/index.php?topic=17500.0;wap2

+7
source

Source: https://habr.com/ru/post/1719334/


All Articles