Extensibility > Graphics Builder Automation Interface > Text Property Functions > AttributeTextFontSize

AttributeTextFontSize

Applies a font size to the selected text, or retrieves the current font size.

Syntax

AttributeTextFontSize(TextFontSize)

TextFontSize:

A value between 0 and 65535 representing the font size.

Return Value

If retrieving the current font size, a value between 0 and 65535. If applying a particular font size, 0 (zero) if successful. In both cases, an error is returned if unsuccessful. If values are out of range on writing to the attribute, the function will exit and report the error E_INVALIDARG. If there is no active text object, these functions throw an exception with a return value of E_HANDLE.

Note: For details on handling return and error values, see Error Handling.

Related Functions

AttributeText, AttributeTextStyle, AttributeTextJustification, AttributeTextFont, AttributeTextColour

Example

' Applies the font size to the selected text
GraphicsBuilder.AttributeTextFontSize = 12

' Retrieves the font size
MyVariable = GraphicsBuilder.AttributeTextFontSize

Note: This function is implemented in the C++ environment as two separate functions: put_AttributeTextFontSize sets the font size, and get_AttributeTextFontSize retrieves the current font size.

Published June 2018