Admin Production ni-theme
Current Publication

CreateMetaFontWithCharacterSet

LabWindows/CVI

CreateMetaFontWithCharacterSet

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

Purpose

Creates a new metafont based on a predefined National Instruments font, an existing metafont, or a font supplied by the operating system. CreateMetaFontWithCharacterSet is similar to CreateMetaFontEx, except that CreateMetaFontWithCharacterSet provides the characterSet parameter.

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 and character set 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
characterSet int The character set of the font.

Note Note  The VAL_OEM_CHARSET, VAL_SYMBOL_CHARSET, and VAL_MAC_CHARSET values are not supported and will default to the System Codepage. You can modify the System Codepage with any of the other supported character sets.


You can select the following values:

Value Description
VAL_NATIVE_CHARSET Character set that corresponds to the language selected in the Control Panel for non-Unicode programs
VAL_ANSI_CHARSET Western character set
VAL_SHIFTJIS_CHARSET Japanese character set
VAL_HANGUL_CHARSET Korean character set
VAL_GB2312_CHARSET Simplified Chinese character set
VAL_CHINESEBIG5_CHARSET Traditional Chinese character set
VAL_HEBREW_CHARSET Hebrew character set
VAL_ARABIC_CHARSET Arabic character set
VAL_GREEK_CHARSET Greek character set
VAL_TURKISH_CHARSET Turkish character set
VAL_VIETNAMESE_CHARSET Vietnamese character set
VAL_THAI_CHARSET Thai character set
VAL_EASTEUROPE_CHARSET Eastern European character set
VAL_RUSSIAN_CHARSET Cyrillic character set
VAL_BALTIC_CHARSET Baltic character set

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