Mega Code Archive
Embedded Font Face with ActionScript By Location
.mystyle1 {
fontFamily:myMyriadFont;
fontSize: 32pt;
}
.mystyle2 {
fontFamily:myBoldMyriadFont;
fontSize: 32pt;
fontWeight: bold;
}
/* * Embed a font by location. */
[Embed(source='a.ttf',fontName='myMyriadFont', mimeType='application/x-font',embedAsCFF='true' )]
// You do not use this variable directly. It exists so that
// the compiler will link in the font. private
var font1:Class;
/** Embed a font with bold typeface by
location. */
[Embed(source='../assets/MyriadWebPro-Bold.ttf',fontWeight='bold', fontName='myBoldMyriadFont',mimeType='application/x-font', embedAsCFF='true' )]
private var font2:Class;