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.
- 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.
- In the fonts.css file, create a new
@font-facedeclaration and specify the ...