In this example you can see how we can use a inline embedded font in flex application.
In this example you can see how we can use a inline embedded font in flex application.In this example you can see how we can use a inline embedded font in flex application. You will set the fontFamily property of the component in inline embedded 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"> <!-- Using Inline Embedded fonts --> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @font-face { src:url("MyriadWebPro-Bold.ttf"); fontFamily: fontFamily1; embedAsCFF: true; } </fx:Style> <s:Panel title="Inline Embedded Font Example" width="268" height="145"> <s:VGroup x="12" y="24" width="241" height="48" > <s:Button label="Submit" fontFamily="fontFamily1"/> <s:Label text="This is a Inline Embedded font." fontFamily="fontFamily1"/> </s:VGroup> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.