CreateMetaFont
int CreateMetaFont (char newMetaFontName[], char existingFontName[], int pointSize, int bold, int italics, int underlined, int strikeout);
Purpose
![]() |
Note This function has been superseded by CreateMetaFontWithCharacterSet, which you can use to specify a value for text angle and character set. |
Creates a new metafont based on a predefined National Instruments font, an existing metafont, or a font supplied by the operating system.
You can use metafonts that you create with this function in any control or panel attribute that requires a font.
The metafonts you create with this function contain typeface information, point size, and text style.
Parameters
Input | ||
Name | Type | Description |
newMetaFontName | char [] | Name to associate with the new metafont. |
existingFontName | char [] | Name of the existing font on which to base the new metafont. The font can be a predefined font; a predefined NI metafont; a user-defined metafont saved by a previous call to functions such as CreateMetaFont and CreateMetaFontEx; or a font, such as Courier, supplied by the operating system. Predefined fonts—Contain typeface information only and use typefaces native to the operating system. The predefined fonts are VAL_MENU_FONT, VAL_DIALOG_FONT, VAL_EDITOR_FONT, VAL_APP_FONT, and VAL_MESSAGE_BOX_FONT. Predefined metafonts—Contain typeface information, point size, and text styles such as bold, underline, italic, and strikeout. These metafonts are used in the LabWindows/CVI environment. The predefined metafonts are VAL_MENU_META_FONT, VAL_DIALOG_META_FONT, VAL_EDITOR_META_FONT, VAL_APP_META_FONT, and VAL_MESSAGE_BOX_META_FONT. LabWindows/CVI-supplied metafonts—Use typefaces that are not native to the operating system. These metafonts are installed while LabWindows/CVI is running. The LabWindows/CVI-supplied metafonts are VAL_7SEG_META_FONT and VAL_SYSTEM_META_FONT. |
pointSize | int | Point size of the new metafont. The valid range is from 1 to 255. |
bold | int | Specify a nonzero value or select yes in the function panel to create a metafont with bold text. Specify 0 or select no in the function panel otherwise. |
italics | int | Specify a nonzero value or select yes in the function panel to create a metafont with italicized text. Specify 0 or select no in the function panel otherwise. |
underlined | int | Specify a nonzero value or select yes in the function panel to create a metafont with underlined text. Specify 0 or select no in the function panel otherwise. |
strikeout | int | Specify a nonzero value or select yes in the function panel to create a metafont with strikeout text. Specify 0 or select no in the function panel otherwise. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to userint\listdelx.cws for an example of using the CreateMetaFont function.