Admin Production ni-theme
Current Publication

CreateMetaFontEx

LabWindows/CVI

CreateMetaFontEx

int CreateMetaFontEx (char newMetaFontName[], char existingFontName[], int pointSize, int bold, int italics, int underlined, int strikeout, int angle);

Purpose

Note 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. CreateMetaFontEx is similar to CreateMetaFont, except that CreateMetaFontEx provides the angle parameter, which you can use to rotate the font.

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, text style, and orientation angle.

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.
angle int The angle of rotation, in tenths of degrees, of the font. For example, if you want to rotate the text by 90°, specify 900. The valid range is from -32768 to 32767.

The following user interface objects support rotated text:

  • Text message controls
  • Control labels
  • Table row labels
  • Table column labels
  • Graph axis labels
  • Strip chart axis labels
  • Digital graph axis labels
  • Graph annotations
  • Text on graphs that you add using PlotText
  • Text you place on canvas controls using CanvasDrawText or CanvasDrawTextAtPoint

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 8.5 and later

Example

Refer to userint\RotatedText.cws for an example of using the CreateMetaFontEx function.