FontCount

From Real Software Documentation

Jump to: navigation, search
Method

Used to determine the number of fonts installed on the user’s computer.


Syntax

result=FontCount

Part Type Name
result Integer The number of fonts installed.

Notes

FontCount is useful when you need to build a list of available fonts or need to determine if a specific font is installed.

Under Mac OS X Cocoa, FontCount returns the number of font families, not the number of fonts. This is closer to Carbon behavior, but will not return identical results.

Examples

This example dynamically creates a Font menu using a menu item array named FontFontName:

Dim m as MenuItem
Dim i,n as Integer
n= FontCount-1
FontFontName(0).Text=Font(0)
For i=1 to n
m=New FontFontName
m.Text=Font(i)
Next


See Also

Font function.

Personal tools