O'Reilly logo

Flash® Builder™ 4 and Flex® 4 Bible by David Gassner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Working with Text

IN THIS CHAPTER

  • Using advanced text layout

  • Controlling fonts

  • Using device fonts

  • Embedding fonts

  • Setting font rotation

  • Using formatter classes

When you present text in a Flex application, many choices and tools can determine how text is displayed and processed. Text values can be "hard-coded" in an application, retrieved from a data source (such as database on a server), and stored in memory as constants or variables.

When text is presented to the user in visual control, you select many font settings, including the font typeface and its size, weight, and style. In this chapter, I describe the various tools available for text processing and presentation in Flex. I describe these strategies and techniques:

  • Using the Flash Text Engine (FTE) to present complex text

  • Selecting device fonts for text display that are already installed on the client computer

  • Embedding fonts to tightly control text display regardless of the state of the client computer

  • Formatting of text values with the formatter family of classes

Any discussion of text presentation in Flex must include the use of Cascading Style Sheets (CSS) to select font typefaces and styles, and the use of visual controls that are specifically designed for text presentation, such as the Label and RichText controls. (Refer to Chapter 8 for a detailed discussion about the use of visual controls and Chapter 11 for more information about CSS.) In this chapter, I describe uses of styles that are specifically designed to control ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required