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.
<strong>Using</strong> device fonts<br />
[Output: IPH, Print, Web] [EditorialStatus: Preliminary Review]<br />
USING FLEX 4<br />
Fonts<br />
You can specify any font for the fontFamily property. However, not all systems have all font faces, which can result<br />
in an unexpected appearance of your controls. The safest course when specifying font faces is to include a device font<br />
as a default at the end of the font list. Device fonts do not export font outline information and are not embedded in the<br />
SWF file. Instead, Flash Player uses whatever font on the client’s local computer most closely resembles the device font.<br />
The following example specifies the device font _sans to use if Flash Player cannot find either of the other fonts on the<br />
client machine:<br />
Resolved code-reference.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
@namespace s "library://ns.adobe.com/flex/spark";<br />
.myClass {<br />
fontFamily: Arial, Helvetica, "_sans";<br />
color: Red;<br />
fontSize: 12;<br />
fontWeight: bold;<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The text in the RichText control uses the myClass class selector.<br />
<br />
<br />
<br />
<br />
<br />
Note: You must surround device font names with quotation marks when defining them with style declarations.<br />
Flash Player supports three device fonts. The following table describes these fonts:<br />
Font name Description<br />
_sans The _sans device font is a sans-serif typeface; for example, Helvetica or Arial.<br />
_serif The _serif device font is a serif typeface; for example, Times Roman.<br />
_typewriter The _typewriter device font is a monospace font; for example, Courier.<br />
3