GetFontTextEncoding

From Xojo Documentation
Jump to: navigation, search
Method

Used to get the text encoding to be used as the output encoding when you are going to display the text in that font. Most fonts will have the same encoding but fonts like Symbol have a different encoding.

Syntax

result=GetFontTextEncoding(FontName)

Part Type Description
result TextEncoding Text encoding of FontName.
FontName String The Name of a font.

It returns the system default encoding if you pass one of the names (e.g., "System", "SmallSystem", "System.UTF8", etc.).

Notes

The font names "System" and "SmallSystem" can be used in place of the names of real fonts when you specify the value of the TextFont property for visible controls. When you use these names, the default system or small system font for the operating system on which the application is running is used. Using System and SmallSystem avoids the need to specify different fonts for different operating systems. Use this feature in conjunction with setting font size equal to zero to tells your app to choose the font size for each platform. On Windows and Linux, "System" and "SmallSystem" are the same.

Examples

The following code returns the text encoding for the Symbol font.

Dim t As TextEncoding
t = GetFontTextEncoding("Symbol")
MsgBox(Str(t.Base))

See Also

TextEncoding class.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About