Specifications
69ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Using character ranges for embedded fonts
By specifying a range of symbols that compose the face of an embedded font, you reduce the size of an embedded
font. Each character in a font must be described; if you remove some of these characters, it reduces the overall size
of the description information that Flex must include for each embedded font.
You can set the range of glyphs in the flex-config.xml file or in the
font-face declaration in each MXML file. You
specify individual characters or ranges of characters using the Unicode values for the characters, and you can set
multiple ranges for each font declaration.
In CSS, you can set the Unicode range with the
unicodeRange property, as the following example shows:
@font-face {
src:url("../assets/MyriadWebPro.ttf");
fontFamily: myFontFamily;
unicodeRange:
U+0041-U+005A, /* Upper-Case [A..Z] */
U+0061-U+007A, /* Lower-Case a-z */
U+0030-U+0039, /* Numbers [0..9] */
U+002E-U+002E; /* Period [.] */
}
In the flex-config.xml file, you can set the Unicode range with the <language-range> block, as the following
example shows:
<language-range>
<lang>Latin I</lang>
<range>U+0020,U+00A1-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183</range>
</language-range>
For more information, see “Using Fonts” on page 653 in the Adobe Flex 3 Developer Guide.
Using multiple SWF files
One way to reduce the size of an application’s file is to break the application up into logical parts that can be sent
to the client and loaded over a series of requests rather than all at once. By breaking a monolithic application into
smaller applications, users can interact with your application more quickly, but possibly experience some delays
while the application is running.
One approach is to use the SWFLoader control. This technique can work with SWF files that add graphics or
animations to an application, or SWF files that act as stand-alone applications inside the main application. If you
import SWF files that require a large amount of user interaction, however, consider building them as custom
components. SWF files produced with earlier versions of Flex or ActionScript may not work properly when
loaded with the SWFLoader control.










