# FontSelectPopup

int FontSelectPopup (char title[], char sampleText[], int monospacedFontsOnly, char typefaceName[], int *bold, int *underline, int *strikeOut,int *italic, int *justification, int *textColor, int *fontSize,int minimumFontSize, int maximumFontSize,int showDefaultButton, int allowMetaFonts);

## Purpose

Opens a dialog box that allows the user to specify font settings.

If the user cancels out of the dialog box or an error occurs, the function does not modify any of the Input/Output parameters.

## Parameters

Input
Name | Type | Description
title | string | Title of the dialog box.
sampleText | string | Sample text to display in the font select pop-up dialog box as demonstration of how the settings affect the appearance of text.
monospacedFontsOnly | integer | If nonzero, the user can select only monospaced, fixed width, fonts. If zero, the user can select any font.
minimumFontSize | integer | Minimum value allowed in the Font Size control.
maximumFontSize | integer | Maximum value allowed in the Font Size control.
showDefaultButton | integer | If zero, the Default button is hidden. If nonzero, the Default button appears. When the user presses the Default button, the controls on the pop-up dialog box are set to the values you specified in your most recent call to SetFontPopupDefaults.
allowMetaFonts | integer | If zero, the National Instruments-supplied metafonts are not listed in the typeface selection ring. If nonzero, the metafonts are listed.
Output
Name | Type | Description
typefaceName | string | On input, this buffer contains the typeface name, for example, "Courier," that initially appears in the selection ring. On output, this buffer contains the typeface name the user selects. The buffer must be at least 256 bytes long. Pass 0 to hide the typeface selection ring and prevent the user from changing the typeface.
bold | integer | On input, the value that initially appears in the Bold checkbox. On output, the final value in the Bold checkbox. Pass 0 to hide the Bold checkbox.
underline | integer | On input, the value that initially appears in the Underline checkbox. On output, the final value in the Underline checkbox. Pass 0 to hide the Underline checkbox.
strikeOut | integer | On input, the value that initially appears in the StrikeOut checkbox. On output, the final value in the StrikeOut checkbox. Pass 0 to hide the StrikeOut checkbox.
italic | integer | On input, the value that initially appears in the Italic checkbox. On output, the final value in the Italic checkbox. Pass 0 to hide the Italic checkbox.
justification | integer | On input, the value that initially appears in the Justification ring control. On output, the final value in the Justification ring control. The valid values of justification are as follows: VAL_LEFT_JUSTIFIED VAL_RIGHT_JUSTIFIED VAL_CENTER_JUSTIFIED
| Note Not all text can be justified. For example, text in a text box can be justified, but the text in a panel title cannot.
Pass 0 to hide the Justification ring control.
textColor | integer | On input, the value that initially appears in the Text Color control. On output, the final value in the Text Color control. textColor is a 4-byte RGB value. An RGB value is an integer in the hexadecimal format 0x00RRGGBB, where RR, GG, and BB are the respective red, green, and blue components of the color value. Pass 0 to hide the Text Color control.
fontSize | integer | On input, the value that initially appears in the Font Size control. On output, the final value in the Font Size control. Specify fontSize in units of points. Pass 0 to hide the Font Size control.

## Return Value

Name | Type | Description
selectionStatus | integer | The selection status or error codes generated during the function call.
0 | User canceled out of dialog box.
1 | User modified the settings.
Negative values indicate that an error occurred.