FontList Collection¶
FontList collection provides a collection of FontItem objects. Retrieves the number of items. Retrieves the FontItem object for the specified index. The following example sets the current font as "Consolas", 15. The following example retrieves and displays the current font name and size. The following retrieves the font for each font category. The following retrieves the font for each font category. Supported on EmEditor Professional Version 7.00 or later.Properties¶
Examples¶
[JavaScript]¶
cfg = document.Config;
fontprop = cfg.Font;
displaylist = fontprop.DisplayList;
nCategory = document.FontCategory;
ft = displaylist.Item(nCategory + 1);
ft.Name = "Consolas";
ft.Size = 15;
ft.Bold = false;
ft.Italic = false;
cfg.Save();
cfg = document.Config;
fontprop = cfg.Font;
displaylist = fontprop.DisplayList;
nCategory = document.FontCategory;
ft = displaylist.Item(nCategory + 1);
alert( ft.Name + ", " + ft.Size );
list = new Enumerator( document.Config.Font.DisplayList );
for( ; !list.atEnd(); list.moveNext() ){
item = list.item();
alert( item.Name );
}
[VBScript]¶
For Each item In document.Config.Font.DisplayList
alert item.Name
Next
Version¶