[]
        
(Showing Draft Content)

C1.Util.FontSubSet.MeasureText

MeasureText Method

MeasureText(string, bool, out int, out int, int)

Measure text for this font subset.

Declaration
public int MeasureText(string text, bool vertical, out int width, out int height, int defaultWidth = 1000)
Public Function MeasureText(text As String, vertical As Boolean, ByRef width As Integer, ByRef height As Integer, Optional defaultWidth As Integer = 1000) As Integer
Parameters
Type Name Description
string text

The text string.

bool vertical

Whether using a vertical font.

int width

Output calculated width of the text.

int height

Output calculated height of the text.

int defaultWidth

The default width of some character.

Returns
Type Description
int

If calculated then return true, otherwise false.

MeasureText(string, bool, out int, out int, out int[], int)

Measure text for this font subset.

Declaration
public int MeasureText(string text, bool vertical, out int width, out int height, out int[] charWidths, int defaultWidth = 1000)
Public Function MeasureText(text As String, vertical As Boolean, ByRef width As Integer, ByRef height As Integer, ByRef charWidths As Integer(), Optional defaultWidth As Integer = 1000) As Integer
Parameters
Type Name Description
string text

The text string.

bool vertical

Whether using a vertical font.

int width

Output calculated width of the text.

int height

Output calculated height of the text.

int[] charWidths

Output calculated widths for each character.

int defaultWidth

The default width of some character.

Returns
Type Description
int

If calculated then return true, otherwise false.