<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import jp.taiga.dto.FontViewDto;
/** @inheritDoc */
protected override function createChildren():void {
super.createChildren();
var i :int;
var length_ :int;
var font_ :Font;
var dto_ :FontViewDto;
var fonts_ :Array;
var newFonts_ :Array;
newFonts_ = [];
fonts_ = Font.enumerateFonts(true).sortOn("fontName", Array.CASEINSENSITIVE);
length_ = fonts_.length;
for(i = 0; i < length_; i++) {
font_ = fonts_[i] as Font;
dto_ = new FontViewDto();
dto_.fontName = dto_.fontView = font_.fontName;
dto_.fontStyle = font_.fontStyle;
dto_.fontType = font_.fontType;
newFonts_.push(dto_);
}
fontDataGrid.dataProvider = newFonts_;
}
]]>
</mx:Script>
<mx:DataGrid id="fontDataGrid" width="100%" height="100%" fontSize="20">
<mx:columns>
<mx:DataGridColumn dataField="fontName" />
<mx:DataGridColumn dataField="fontView" itemRenderer="jp.taiga.renderer.CustomDataGridItemRenderer" />
<mx:DataGridColumn dataField="fontStyle" width="150" />
<mx:DataGridColumn dataField="fontType" width="150" />
</mx:columns>
</mx:DataGrid>
</mx:Application>