Applies To:
  • CitectSCADA 3.4, 4.2

Summary:
The Citect runtime uses the windows font mapper to display fonts. A number of font attributes determine which font is displayed by the font mapper. If fonts from an alternative character set are used, the fonts displayed by the font mapper may not be the desired fonts. 

Solution:
Two parameters exist to make the font mapper display the correct font.

These parameters are [Animator]FontPrecision and [Animator]FontCharacterSet. The defaults for both these parameters are the system defaults of 0. These parameters can be used in conjunction to ensure alternative character set fonts display correctly. The following details the use of these parameters with the Windows font mapper.

FontCharacterSet
Specifies the character set. The following values are predefined:

ANSI_CHARSET 0
DEFAULT_CHARSET 1
SYMBOL_CHARSET 2
SHIFTJIS_CHARSET 128
GB2312_CHARSET 134
HANGEUL_CHARSET 129
CHINESEBIG5_CHARSET 138
OEM_CHARSET 255

Windows 95 only:

JOHAB_CHARSET 130
HEBREW_CHARSET 177
ARABIC_CHARSET 178
GREEK_CHARSET 161
TURKISH_CHARSET 162
THAI_CHARSET 222
EASTEUROPE_CHARSET 238
RUSSIAN_CHARSET 204
MAC_CHARSET 77
BALTIC_CHARSET 186

The OEM_CHARSET value specifies a character set that is operating-system dependent.

You can use the DEFAULT_CHARSET value to allow the name and size of a font to fully describe the logical font. If the specified font name does not exist, a font from any character set can be substituted for the specified font, so you should use DEFAULT_CHARSET sparingly to avoid unexpected results.

Fonts with other character sets may exist in the operating system. If an application uses a font with an unknown character set, it should not attempt to translate or interpret strings that are rendered with that font.

This parameter is important in the font mapping process. To ensure consistent results, specify a specific character set. Make sure that the FontCharacterSet value matches the character set of the typeface specified.

FontPrecision
Specifies the output precision. The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, pitch, and font type. It can be one of the following values:

Name (Value) Meaning
OUT_CHARACTER_PRECIS (2) Not used.
OUT_DEFAULT_PRECIS (0) Specifies the default font mapper behavior.
OUT_DEVICE_PRECIS (5) Instructs the font mapper to choose a Device font when the system contains multiple fonts with the same name.
OUT_OUTLINE_PRECIS (8) Windows NT: This value instructs the font mapper to choose from TrueType and other outline-based fonts.
Windows 95: This value is not used.
OUT_RASTER_PRECIS (6) Instructs the font mapper to choose a raster font when the system contains multiple fonts with the same name.
OUT_STRING_PRECIS (1) This value is not used by the font mapper, but it is returned when raster fonts are enumerated.
OUT_STROKE_PRECIS (3) Windows NT: This value is not used by the font mapper, but it is returned when TrueType, other outline-based fonts, and vector fonts are enumerated.
Windows 95: This value is used to map vector fonts, and is returned when TrueType or vector fonts are enumerated.
OUT_TT_ONLY_PRECIS (7) Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system, the font mapper returns to default behavior.
OUT_TT_PRECIS (4) Instructs the font mapper to choose a TrueType font when the system contains multiple fonts with the same name.

Applications can use the OUT_DEVICE_PRECIS, OUT_RASTER_PRECIS, and OUT_TT_PRECIS values to control how the font mapper chooses a font when the operating system contains more than one font with a given name. For example, if an operating system contains a font named Symbol in raster and TrueType form, specifying OUT_TT_PRECIS forces the font mapper to choose the TrueType version. Specifying OUT_TT_ONLY_PRECIS forces the font mapper to choose a TrueType font, even if it must substitute a TrueType font of another name.

Copyright (c) 1994-1997 Microsoft Corporation.

These parameter has been introduced in 3.4/4.2 Service Pack F.

Notes:

  • The Windows Font Mapper is an algorithm that Windows uses to determine which available font most closely matches a requested font.
  • The font mapper help is adapted from the Microsoft Visual C++ online help on LOGFONT.
 

Keywords:
 

Attachments