Groups | Blog | Home
all groups > flash actionscript > november 2005 >

flash actionscript : embedded Fonts on demand



Sukram Nietsloh
11/10/2005 11:05:22 PM
Hi there,

are there any chances to apply a font to a textfield, where the the font was
loaded from a swf file, which only embedds a font.

If not, what could I do, to "pretend" it?

Greets and thanks in advance
Sukram

------------------------------------
My Flash: Flash Professional 8 Trialversion
juankpro
11/11/2005 12:01:50 AM
You can use what it is called shared libraries. First create an SWF file with
the font, then right click the font symbol in the library, select linkage and
then select export for runtime sharing. In the texfield at the bottom write the
name that your final font SWF file will be called.

Export the file and place it in the same folder as the SWF file that will use
it.

Open the flas files with the font and your application an drag the font symbol
from that font file to your application. This is it. You can use this font and
it is loaded just once, from the font swf file.
Sukram Nietsloh
11/11/2005 9:29:48 AM
Hi,

thanks for your fast reply.
But I seem to be to stupid. The font does not show up.
Here is, what I did:

1) Created a new fla-File "arial.swf" with size of 1px * 1px
2) Inserted a new font in the library : Name="Arial", font="Arial"
3) Descriptor ist "Arial"
4) Selected "export for runtime sharing", url="arial.swf"
5) Dragged the symbol from the library onto the stage of the application. The
Symbol showed up in the applications library
6) Used tf.font="Arial";
If I now use "embedFonts = true;", no text appears.
I also tried to name "Arial" as "Arial1" to avoid nameconfilicts, but it did
not work either.
And furthermore I loaded the swf during runtime, but: same result - no result.

Did I forget something? Or made something wrong?

By the way, is the font really loaded on demand?

Greetings and thanks in advance
Sukram




AddThis Social Bookmark Button