Previous Page
Next Page

Recipe 9.30. Retrieving a List of System Fonts

Problem

You want to retrieve a list of fonts on the user's system.

Solution

Use the static TextField.fontList property.

Discussion

When you want to use system fonts (rather than embedding the font or using a font group), first determine which fonts the user has installed. You can retrieve an array of system fonts on the user's computer with the TextField.fontList property.

trace(TextField.fontList);

Retrieving the list of available system fonts simply yields an array of strings. To apply a font to the text, you'll have to use one of the techniques discussed in Recipe 9.16.


Previous Page
Next Page
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)