The chapter on using fonts in Flex 4 has been updated. This chapter discusses embedding fonts, setting character ranges, and troubleshooting among other things.
While there aren’t any new features for fonts in Flex 4, there are some significant changes you should be aware of. For example:
- Support for TLF is on by default (all Spark components use this new library of text manipulation)
- Using embedded fonts with Halo/MX controls might require you to set some style properties to ensure that the right font is used
- Font fallback substitutes a character from a device font that might not be available in an embedded font
One of the biggest changes you’ll notice is that all the examples now specify a property when embedding fonts:
embedAsCFF. This property determines how a font is embedded: with DefineFont4 or DefineFont3. When embedded with DefineFont4, an embedded font can use the features of TLF. All Spark controls support DefineFont4. Some Halo controls support it, if you set their text renderers to use the new TLFTextField and TLFTextInput classes. This is all described in the doc.
One further note: For Beta 2, this document is accurate. However, for the final release, the following class names will be changed:
- TLFTextField will become FTETextField
- UITLFTextField will become UIFTETextField
- TLFTextInput will become FTETextInput
Click here to download the latest Fonts documentation: