Mega Code Archive

 
Categories / Flex / Graphics
 

Specify fontWeight and fontStyle in the @font-face and selector blocks

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Style>     @font-face {         src:url("a.TTF");         fontStyle: italic;         fontWeight: bold;         fontFamily: myFont;         advancedAntiAliasing: true;     }     .myBoldItalicStyle {         fontFamily:myFont;         fontWeight:bold;         fontStyle:italic;         fontSize: 32;     }     .mystyle1 {         fontFamily:myPlainFont;         fontSize: 32pt;     }     .mystyle2 {         fontFamily:myItalicFont;         fontSize: 32pt;         fontStyle: italic;     }     </mx:Style>     <mx:Panel title="Embedded Fonts Using CSS">         <mx:VBox>             <mx:Label width="100%" height="75" styleName="mystyle1" text="The text uses the plain typeface." rotation="15"/>             <mx:Label width="100%" height="75" styleName="mystyle2" text="The text uses the italic typeface." rotation="15"/>         </mx:VBox>     </mx:Panel> </mx:Application>