Search code examples
flashfontsembedding

font embedding in flash- query re external swfs


I've embedded a font in a flash based website. The site loads external swfs which also contain content in that font. Can these external swfs make use of the font without it being embedded in them?


Solution

  • It seems it IT possible. I haven't done it myself, but here's a some info in the docs:

    The ISWFContext interface allows a SWF file to share its context with other SWF files that load it. An application that loads a SWF file of type ISWFContext can call methods in the context of the loaded SWF file. The main usage is for calling the FTE TextLine creation methods.

    There are two reasons for an application to use this interface to control TextLine creation:

    Reuse an embedded font: if an application wants to use a font embedded in a loaded SWF file, the application can access the font if a TextLine is created in the context of the loaded SWF file.

    From here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/compose/ISWFContext.html

    It seems you make one SWF file, embed the font in that one, and reuse that SWF.