<div class="meta" robots="noindex">

</div>

Method

# FontCount

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `System.FontCount<system.fontcount>` as a replacement.

</div>

## Description

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

## Usage

*result*=**FontCount**

| Part   | Type                               | Name                           |
|--------|------------------------------------|--------------------------------|
| result | `Integer</api/data_types/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 macOS, <span class="title-ref">FontCount</span> 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.

## Sample code

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

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

## Compatibility

All project types on all supported operating systems.

## See also

`Font</api/graphics/font>` function.
