A Long type property. Gets or sets the index of the font in the font collection of the document, used to display the characters of this character block.
Applies to: Character object
[[Let] longRet =] object.Font [Let] object.Font = fontIndexSet |
The Font property syntax has these parts:
Part | Description |
object | Required. An expression that returns a Character object. |
longRet | Optional. A Long type variable. |
fontIndexSet | Required. An expression that returns a Long value. |
Each font in the font collection of a ConceptDraw document has has a unique number (index). The fonts are numbered starting from 0. This should be considered when you change the value of the Font property.
The Font property is also a table parameter of the shape which contains the object character block, that is, its value can be described by a formula. To work with Font as a table parameter, use the CDPT_CHAR_FONT constant tag.
Font numbers may change when fonts are added to or removed from the system. Also keep in mind that font sets are different on different computers. To find out a font's index and the total number of fonts installed on the system, use the FontName, FindFontByName, FontsNum methods of the Document object.
This example is used to change the font of the shape with ID 1, which is located on the current page.
Dim MyFontNumber As Long, MyShape As Shape |
See Also |
Character object, FontName method , FindFontByName method , FontsNum method |