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.
USING FLEX 4<br />
Fonts<br />
The [Embed] metadata tag takes the same properties that you set as the @font-face rule. You separate them with<br />
commas. For the list of properties, see “Embedded font syntax” on page 5<br />
The following examples embed fonts by location by using the [Embed] tag syntax:<br />
Resolved code-reference.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
.mystyle1 {<br />
fontFamily:myMyriadFont;<br />
fontSize: 32pt;<br />
}<br />
.mystyle2 {<br />
fontFamily:myBoldMyriadFont;<br />
fontSize: 32pt;<br />
fontWeight: bold;<br />
}<br />
<br />
<br />
/*<br />
* Embed a font by location.<br />
*/<br />
[Embed(source='../assets/MyriadWebPro.ttf',<br />
fontName='myMyriadFont',<br />
mimeType='application/x-font',<br />
cff='true'<br />
)]<br />
// You do not use this variable directly. It exists so that<br />
// the compiler will link in the font.<br />
private var font1:Class;<br />
/*<br />
* Embed a font with bold typeface by location.<br />
*/<br />
[Embed(source='../assets/MyriadWebPro-Bold.ttf',<br />
fontWeight='bold',<br />
fontName='myBoldMyriadFont',<br />
mimeType='application/x-font',<br />
advancedAntiAliasing='true',<br />
cff='true'<br />
)]<br />
8