<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white" viewSourceURL="srcview/index.html">
<mx:Style>
.regularFontStyle {
fontFamily: regularFont;
}
.italicFontStyle {
fontFamily: italicFont;
fontStyle: italic;
}
</mx:Style>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.utils.ObjectUtil;
[Bindable]
[Embed("bulletWarning.png")]
private var bulletWarningIcon:Class;
[Embed(systemFont="Tahoma",
fontName="regularFont",
mimeType="application/x-font")]
private var font1:Class;
[Embed(systemFont="Tahoma",
fontName="italicFont",
fontStyle="italic",
advancedAntiAliasing="true",
mimeType="application/x-font")]
private var font2:Class;
private function displayEmbeddedFont(name:String):void {
var font:Object = systemManager.embeddedFontList[name];
Alert.show(ObjectUtil.toString(font), name + ":");
}
]]>
</mx:Script>
<mx:Form>
<mx:FormItem label="regularFont:" direction="horizontal">
<mx:Label id="lbl1"
text="The quick brown fox jumped over the lazy dog."
styleName="regularFontStyle" />
<mx:Image source="{bulletWarningIcon}"
click="displayEmbeddedFont('regularFont');" />
</mx:FormItem>
<mx:FormItem label="italicFont:" direction="horizontal">
<mx:Label id="lbl2"
text="The quick brown fox jumped over the lazy dog."
styleName="italicFontStyle" />
<mx:Image source="{bulletWarningIcon}"
click="displayEmbeddedFont('italicFont');" />
</mx:FormItem>
</mx:Form>
</mx:Application>