fonts property
Retrieves a collection of all the system-supported fonts.
Syntax
| JavaScript | |
|---|
Property values
Type: Object
A collection of system-supported fonts.
Standards information
There are no standards that apply here.
Remarks
fonts was introduced in Microsoft Internet Explorer 6
Examples
The following example displays the total number of system fonts, and then displays a list of their names.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/editing/DialogHelper/fontsshowme.htm
function testFonts() { var a=dlgHelper.fonts.count; alert(a); //show total number of system fonts for (i = 1;i < dlgHelper.fonts.count;i++) { var f= f + " " + dlgHelper.fonts(i) } alert(f); //show names of all system fonts }
Show: