Using Adobe® Flex® 4 - Adobe Blogs
Using Adobe® Flex® 4 - Adobe Blogs
Using Adobe® Flex® 4 - Adobe Blogs
- TAGS
- using
- adobe
- blogs
- blogs.adobe.com
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
private var font2:Class;<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
USING FLEX 4<br />
Fonts<br />
You use the value of the fontName property that you set in the [Embed] tag as the alias (fontFamily) in your style<br />
definition.<br />
To embed a font with a different typeface (such as bold or italic), you specify the fontWeight or fontStyle properties<br />
in the [Embed] statement and in the style definition. For more information on embedding different typefaces, see<br />
“<strong>Using</strong> multiple typefaces” on page 15.<br />
You can specify a subset of the font’s character range by specifying the unicodeRange parameter in the [Embed]<br />
metadata tag or the @font-face declaration. Embedding a range of characters rather than using the default of all<br />
characters can reduce the size of the embedded font and, therefore, reduce the final output size of your SWF file. For<br />
more information, see “Setting character ranges” on page 19.<br />
<strong>Using</strong> advanced anti-aliasing with non-CFF based fonts<br />
[Chunk: No] [Output: IPH, Print, Web] [EditorialStatus: Preliminary Review]<br />
When you embed non-CFF fonts (with the embedAsCFF property set to false), you can use advanced anti-aliasing to<br />
provide those fonts with additional information about the font. Non-CFF embedded fonts that use the advanced antialiasing<br />
information are typically clearer and appear sharper at smaller font sizes. CFF fonts have this information by<br />
default.<br />
By default, non-CFF fonts that you embed in Flex applications use the advanced anti-aliasing information. This default<br />
is set by the fonts.advanced-anti-aliasing compiler option in the flex-config.xml file (the default value is true).<br />
You can override this default value by setting the value in your style sheets or changing it in the configuration file. To<br />
disable advanced anti-aliasing in style sheets, you set the advancedAntiAliasing style property to false in your<br />
@font-face rule, as the following example shows:<br />
@font-face {<br />
src:url("../assets/MyriadWebPro.ttf");<br />
fontFamily: myFontFamily;<br />
advancedAntiAliasing: false;<br />
embedAsCFF: false;<br />
}<br />
9