Steps for creating font library SWFs

With understanding of font symbols in place, we are now ready to create font library files. To reiterate, these files are created to provide a per-language source fonts. The details of how library fonts are mapped and substituted will be described in the next section.

To create a font library file for a specific language you create a new FLA in the Flash Studio and populate its library with font symbols. Specifically, you can go through the following steps.

  1. Identify fonts used for all of the game screens and give them unique names based on their purpose. ‘\(TitleFont’ and ‘\)NormalFont’ can be good names to use for the game’s title and normal size fonts, respectively.
  2. Create a new FLA file for the library.
  3. Create a new font symbol for every font identified in step 1.
  4. If you plan to use imported font substitution, configure linkage properties for each font so that it is exported with the same identifier as the font symbol name.
  5. Specify which glyphs should be embedded.
  6. Save the resulting file as fonts_.swf, where ‘lang’ represents the language (for example, ‘en’ – English, ‘ru’ – Russian, ‘jp’ – Japanese, ‘cn’ – Chinese, ‘kr’ – Korean, etc). The name can be any, but you’ll need to use this name later for FontMap configuration. Unless you would like to have use of additional text fields for documentation purposes, there is no need to add any textfields into a stage of the font library. Aside from the fonts, no other symbol types should be added to the font library file. After the FLA is finished, the library should look similar to the following.

With the font library complete, its symbols are ready for use in the rest of the application’s user interface screens. To make library fonts available in the importing files, you can either drop the font symbols into the target movie stage or use the Copy / Paste technique described earlier.