Kinesis SoftwareKineticFusion

[Show Table of Contents]

7 SWF Movie Concepts

[Hide Table of Contents]



7.3 Text And Fonts

There are two types of text symbols that can be represented within an SWF: static text and dynamic text. Static text is text that is pre-rendered (the location of each character is fixed) and cannot be altered at run-time, dynamic text is more powerful as the contents can be changed when the movie is running either programmatically or by user input. Dynamic text is rendered only at runtime.

Each text symbol is associated with at least one font symbol that is also stored as symbol within the SWF. A Font symbol specifies the font name and style of the associated font and it may also contain the actual glyph information for some or all the characters in the font. Where glyph information is available, the font is known as an embedded font as the rendering of the font is independent of whether the font exists on the client machine on which the movie is rendered.

If a font is embedded, the author of the font is responsible for determining what glyphs are stored with the font. When only static text is used, then it is sufficient to only embed those glyphs used in the static text. When dynamic text is used however, then all the glyphs that the user expects to use must be embedded. In general, an entire font is not embedded in an SWF as each font takes up a considerable amount of space. Instead, only select groups of characters are embedded such as all alphanumeric characters and punctuation.

For dynamic text symbols, it may also be necessary to embed additional font symbols that are not referenced directly by the symbol. This is necessary when the dynamic text filed is used to render HTML fragments that contain references to multiple fonts or font styles. In this case, it is the responsibility of the user to again ensure that the required font symbols are embedded in the SWF.

When a font symbol is not an embedded font type, the only information about the font that needs to be stores is the general font name and style. These fonts must be present on the client system and the client computer is used to render the fonts.