Difference between revisions of "FontCount"

From Xojo Documentation

m (Text replacement - "{{Deprecated" to "{{DeprecatedItem")
m (Text replacement - "{{DeprecatedItemItem|" to "{{DeprecatedItem|")
Line 1: Line 1:
| name=FontCount
| name=FontCount

Latest revision as of 19:07, 3 September 2020


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



Part Type Name
result Integer The number of fonts installed.


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

Under macOS, FontCount returns the number of font families, not the number of fonts. This is closer to the older Carbon behavior, but will not return identical results.


This example populates a top-level menu called FontMenu with the names of the installed fonts:

For i As Integer = 0 To FontCount - 1
FontMenu.Append(New MenuItem(Font(i)))

See Also

Font function.