Chapter 9.2. Packaging a CSS File with a Font as a SWF

In this exercise, you will learn another way to compile and embed fonts as a SWF (pronounced “swif”) in your Flex application by using the Compile CSS to SWF feature in Flex. The nice thing is that you don’t need to have Flash. This is the same method discussed in Chapter 4, “Styling,” for compiling a CSS file of component styles into a SWF. However, this method does not require you to use Flash and is done entirely within Flex Builder.

  1. In Flex Builder, create a new CSS file called fonts.css and a folder called fonts. Drop an OTF or TTF font into the fonts folder. The OTF font Myriad Pro Bold will be used in this example.

  2. In the fonts.css file, create a new @font-face declaration and specify ...

Get Creating Visual Experiences with Flex 3.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.