Condividi tramite


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

Term

Definition

nFontCharSet

Specifies a numerical value for the language script you want.

The following table lists the values for FontCharSet.

Remarks

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

The operating system and font determine the default setting for FontCharSet. Setting FontCharSet to 1 indicates the Visual FoxPro to use the default setting. If you set FontCharSet in the Properties window explicitly by choosing a language script from the Font dialog box, the Properties window displays the specific font. For example, suppose you set the FontCharSet property for a text box to 1 (Western) in the Properties window. If you open the Font Dialog Box and select 0 (Western), the Properties window displays 0 (Western) because it was set explicitly.

Tip

To reset the property to the default setting, right-click the property in the Properties window and click Reset to Default.

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

Reference

GETFONT( ) Function

Style Property

AFONT( ) Function

Other Resources

Properties (Visual FoxPro)