Embed boldface, oblique, and plain typefaces
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Style>
@font-face {
src:url("a.ttf");
fontFamily: myFont;
flashType: true;
}
@font-face {
src:url("a.ttf");
fontFamily: myFont;
fontWeight: bold;
flashType: true;
}
@font-face {
src:url("a.ttf");
fontFamily: myFont;
fontStyle: italic;
flashType: true;
}
.myPlainStyle {
fontSize: 32;
fontFamily: myFont;
}
.myBoldStyle {
fontSize: 32;
fontFamily: myFont;
fontWeight: bold;
}
.myItalicStyle {
fontSize: 32;
fontFamily: myFont;
fontStyle: italic;
}
</mx:Style>
<mx:VBox>
<mx:Label text="Plain Label" styleName="myPlainStyle"/>
<mx:Label text="Italic Label" styleName="myItalicStyle"/>
<mx:Label text="Bold Label" styleName="myBoldStyle"/>
</mx:VBox>
</mx:Application>
Related examples in the same category