Go to: Synopsis. Return value. Flags. MEL examples.
fontDialog [-FontList] [-scalable]
fontDialog is undoable, NOT queryable, and NOT editable.
Displays a dialog of available fonts for the user to select from. The
name of the selected font is returned, or an empty string if no font was selected.
When the FontList flag is used, no dialog is displayed. Instead
the command returns an array of the available fonts.
FontList, scalable
Long name (short name) |
Argument types |
Properties |
|
-FontList(-fl)
|
|
|
|
Returns an array of all available font names. No dialog is displayed.
|
|
-scalable(-sc)
|
|
|
|
Limits the fonts returned or displayed to just those that are scalable.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
// Display a selection dialog containing all available fonts and save
// the one selected by the user.
string $selectedFont = `fontDialog`;
// Get an array of all available fonts.
string $fonts[] = `fontDialog -FontList`;
// Get an array of scalable fonts.
string $scalableFonts[] = `fontDialog -FontList -scalable`;