Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DspFont

  • Last UpdatedJul 18, 2023
  • 2 minute read

Creates a font and returns a font handle. If the requested font already exists, its font handle is returned. You can use this font handle in the functions that display text, buttons, and text files.

If the exact font size does not exist, the closest font size is used.

Syntax

DspFont(FontType, PixelSize, ForeOnColor, BackOnColor [, ForeOffColor] [, BackOffColor] )

FontType:

The font type, for example, "Helv".

PixelSize:

The font size, as a positive number for pixels, or a negative number for points.

ForeOnColor:

The foreground color used for the text. If implementing flashing color, this is the initial color that will be used. Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeColour.

BackOnColor:

The color used for the background of text. If implementing flashing color, this is the initial color that will be used. Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeColour.

ForeOffColor:

An optional argument only required if implementing flashing color for the font foreground. It represents the secondary color used. Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeColour.

BackOffColor:

An optional argument only required if implementing flashing color for the font background. It represents the secondary color used. Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeColour.

Return Value

The font handle as an integer. If the font cannot be created, -1 is returned. The font handle identifies the table where all data on the associated font is stored.

DspFontHnd, DspText, DspButton, DspButtonFn, DspFile, DspSetPopupMenuFont

Example

Font = DspFont("Helv", -12, White, Red);

DspText(20, Font, "Text in Helv Font");

/* Displays "Text in Helv Font" in 12-point Helvetica font in

white on red at AN20. */

Font = DspFont("Helv", 24, White, Red, Black);

DspText(20, Font, "Text in Helv Font");

/* Displays "Text in Helv Font" in 24 pixel Helvetica font in

flashing black and white on red at AN20. */

See Also

Display Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in