Method
GetFontTextEncoding
Description
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.
Usage
result = GetFontTextEncoding(FontName)
Part |
Type |
Description |
---|---|---|
result |
Text encoding of FontName. |
|
FontName |
The Name of a font. |
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.
Sample code
The following code returns the text encoding for the Symbol font.
Var t As TextEncoding
t = GetFontTextEncoding("Symbol")
MessageBox(t.Base.ToString)
Compatibility
All project types on all supported operating systems.
See also
TextEncoding class.