# FontOptions
Class
## About
`FontOptions` defines the font names, suggested sizes, custom-size availability, and permitted text-style toggles presented by the editor toolbar.
Every editor owns a default instance. A node may assign its own `FontOptions` to replace those choices while that node is active.
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AddFontName | value As String | (None) | Adds font name to this font options. |
| AddFontNameAt | index As Integer <br> value As String | (None) | Adds font name at to this font options. |
| AddSize | value As Double | (None) | Adds size to this font options. |
| AddSizeAt | index As Integer <br> value As Double | (None) | Adds size at to this font options. |
| Constructor | includeSystemFonts As Boolean = True <br> includeDefaultSizes As Boolean = True | (None) | Creates a new font options instance initialized from the supplied values. |
| FontNameAt | index As Integer | String | Returns the font name at the specified index. |
| FontNames | (None) | String | Returns a copy of the available font-name list. |
| IndexOfFontName | value As String | Integer | Returns the zero-based index of font name, or -1 when it is not present. |
| IndexOfSize | value As Double | Integer | Returns the zero-based index of size, or -1 when it is not present. |
| LastFontNameIndex | (None) | Integer | Returns the last zero-based font name index, or -1 when there are no font names. |
| LastSizeIndex | (None) | Integer | Returns the last zero-based font size index, or -1 when there are no font sizes. |
| RemoveAllFontNames | (None) | (None) | Removes all font names entries. |
| RemoveAllSizes | (None) | (None) | Removes all sizes entries. |
| RemoveFontName | value As String | (None) | Removes font name from this font options. |
| RemoveFontNameAt | index As Integer | (None) | Removes font name at the specified index. |
| RemoveSize | value As Double | (None) | Removes size from this font options. |
| RemoveSizeAt | index As Integer | (None) | Removes size at the specified index. |
| SizeAt | index As Integer | Double | Returns the font size at the specified index. |
| Sizes | (None) | Double | Returns a copy of the available font-size list. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AllowBold | Boolean | (None) | Controls whether bold is available. |
| AllowCode | Boolean | (None) | Controls whether inline code is available. |
| AllowCustomFontSize | Boolean | (None) | Controls whether the font-size menu allows a custom user-entered value. |
| AllowHighlight | Boolean | (None) | Controls whether highlighting is available. |
| AllowItalic | Boolean | (None) | Controls whether italic is available. |
| AllowKeyboard | Boolean | (None) | Controls whether keyboard-key formatting is available. |
| AllowStrikethrough | Boolean | (None) | Controls whether strikethrough is available. |
| AllowSubscript | Boolean | (None) | Controls whether subscript is available. |
| AllowSuperscript | Boolean | (None) | Controls whether superscript is available. |
| AllowUnderline | Boolean | (None) | Controls whether underline is available. |
## Notes
Font options affect toolbar choices and capabilities; they do not restyle existing content automatically.
### Customization
Modify the editor's instance during `Opening`. Font and size order is preserved. The editor presents available font names in a searchable, scrollable chooser and previews each entry using that font. Automatic, which follows `Editor.FontName`, is always listed first and is not one of the font names. Removing every predefined size is valid: the size item remains enabled only when `AllowCustomFontSize` permits direct entry. Removing every font name disables the font item.
The allow-style properties control whether Bold, Italic, Underline, and Strikethrough are applicable to the active content. They describe user-facing capability rather than forcing a style onto existing text.
## Examples
Customize the editor-owned instance during the editor's `Opening` event.
### Constrained Typography
```xojo
Editor.FontOptions.RemoveAllSizes
Editor.FontOptions.AddSize(12)
Editor.FontOptions.AddSize(16)
Editor.FontOptions.AddSize(24)
Editor.FontOptions.AllowCustomFontSize = False
```