In this example you can see how we can use a type faces font in multiple form.
In this example you can see how we can use a type faces font in multiple form.In this example you can see how we can use a type faces font in multiple form. In this example we use a three font file: simple, bold and italic font.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <!-- Embedded font using multiple faces --> <fx:Style> @font-face { src:url("MyriadWebPro.ttf"); fontFamily: fontfamily1; embedAsCFF: true; } @font-face { src:url("MyriadWebPro-Bold.ttf"); fontFamily: fontfamily1; fontWeight: bold; embedAsCFF: true; } @font-face { src:url("MyriadWebPro-Italic.ttf"); fontFamily: fontfamily1; fontStyle: italic; embedAsCFF: true; } .plainStyle { fontSize: 30px; fontFamily: fontfamily1; color:red; } .boldStyle { fontSize: 30px; fontFamily: fontfamily1; fontWeight: bold; color:green; } .italicStyle { fontSize: 30px; fontFamily: fontfamily1; fontStyle: italic; color:blue; } </fx:Style> <s:Panel title="Embedded font with multiple faces Example" width="297" height="164"> <s:VGroup x="12" y="13"> <s:Label text="This is a Plain Text" styleName="plainStyle"/> <s:Label text="This is a Bold Text" styleName="boldStyle"/> <s:Label text="This is a Italic Text" styleName="italicStyle"/> </s:VGroup> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.