FontCharSet Property

Specifies the character set, or language script, of the font used to display text for every object that supports fonts. Read/write at design and run time.

Object.FontCharSet [ = nFontCharSet ]

Parameters

Numerical data type. The following table lists the values for FontCharSet.

nFontCharSet Language script
0 Standard Windows characters (ANSI)
1 Default
2 Symbol
77 Macintosh
128 Japanese
129 Korean
134 Simplified Chinese
136 Traditional Chinese
161 Greek
162 Turkish
163 Vietnamese
177 Hebrew
178 Arabic
186 Baltic
204 Cyrillic
238 Central European
255 OEM/DOS

Remarks

When setting the FontCharSet property, you must use a numeric value, not the language script name, for example, Western.

Visual FoxPro attempts to retrieve the character set identifier for the font you specify. If Visual FoxPro cannot find the character set identifier, or if you pass an invalid FontCharSet value for a particular font set, the Windows font manager makes the appropriate substitution using the Default character set, usually ANSI or Symbol.

Fonts support only certain language scripts. To choose a language script that a font can support, select the FontCharSet property in the Properties window and click the ellipsis (…) button that appears to open the Font dialog box. You can select a language script from the Script drop-down list. You can also change the font, size, and style. Visual FoxPro updates the font properties with the changed values.

If you change the font to one for which the current FontCharSet value is not supported, Visual FoxPro resets the FontCharSet property.

If the Style property for a Label is set to 3 (Themed), the FontCharSet property is ignored. If the Themes property is set to True (.T.) for a grid, the FontCharSet property for the grid Header is ignored. To display the grid Header using the FontCharSet property, set Themes of the grid to False (.F.).

The GETFONT( ) function supports the passing or retrieving of a font script.

See Also

Properties | GETFONT( ) Function | Style Property | AFONT( ) Function

Applies To: CheckBox Control | Column Object | ComboBox Control | CommandButton Control | EditBox Control | Form Object | Grid Control | Header Object | Label Object | ListBox Control | OptionButton Control | Page Object | _SCREEN System Variable | Spinner Control | TextBox Control