GefFontFormat.CharSet (property)

Gets and sets the character set of the font.
Syntax: short = object.CharSet
object.CharSet = short
Description: Do not use this property if you do not understand the meaning and use of character sets in the Windows Platform SDK. Refer to the Windows Platform SDK documentation for the LOGFONT structure for more information about the character set.

You can determine the character set number for a font by using the font in a CimEdit screen and looking at the CTX file.

The font attribute contains the character set in its high-order byte. For example, a CTX file might have the entry (Font "Arial" 0 -360 1 41216). The font attribute field is 41216 (decimal) which is &hA100. The high-order byte is &hA1 or 161 (decimal).

Here are some values for the character set property.
Description Value
Western 0
Greek 161
Turkish 162
Baltic 186
Cyrillic 204

Example:

Sub GefFontFormat_CharSet()
    
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Dim oCimFntFmt As GefFontFormat
    
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        Set oCimFntFmt = oCimTxtFmt.Font
        If Not oCimFntFmt Is Nothing Then
            oCimFntFmt.Charset = 204
            CimGetScreen.Refresh False
        End If
    End If
    
End Sub