Note: This feature is available in Web Workers.
The size property of the FontFaceSet interface returns the number of items in the FontFaceSet.
An integer indicating the number of items in the FontFaceSet.
In the following example the size of the FontFaceSet is printed to the console.
console.log(document.fonts.size);