views:

264

answers:

2

I want to display "Hello World" with calibri.ttf using only AC3. How would I do that?

Found two solutions on the web but I cannot use any of them - The Adobe documentation site requires the use of Flash CS4. (Don't know how to use this in Flex Builder) - The embed tag method requires FLEX SDK

Is it possible to embed font with purely Actionscript 3 in an actionscript project using Flex Builder?

+1  A: 

Right-click on the library in your Flash Project, and you have the option to add the Font there. You can even just create an empty dynamic text field, and have it embed all the characters you need.

In the settings, you have the option to give you the compilation details, so when you compile the project you can see what was included, and in both cases you should see the font be included.

--edit-- right, sorry I understood that you're using Flash, my bad

you can use something like this

[Embed(source='/assets/calibri.ttf', fontName="Font", mimeType="application/x-font-truetype")]
private static var calibri:String;
Daniel
I don't see the library option. I'm using Adobe Flex Builder. ActionScript Project
Jan
A: 

Flex Builder includes the Flex SDK, and uses the SDK for compilation. In a pure AS3 project you'd thus use the embed tag to embed fonts.

greetz

back2dos

back2dos