GetFontCode Property

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:25

Description

Returns the code of the characters' font.

Note: have in mind that this function returns 0 as font code when the type of the cursor position is not in text, but before hyphen, end of line, end of para and similar, i.e. when Type function of Desc object returns value different than 0.

You may consider to use FontCode function of the TextStatus Object to get the font code disregarding cursor position.

Syntax

object.GetFontCode

object

Required. Object name, returned by objCursor created through Text.GetCursor.

Example

Dim objCur = Text.GetCursor(modeSrcOn,cposCursor,False)

Dim objdesc As TxtPosDesc = objCur.GetDesc

Value = objDesc.GetFontCode

Remarks

The similar functionality is available in object returned by Text.GetTextStatus, Text.GetParaTextStatus and Text.GetDefaultTextStatus functions. See TextStatus Object.