get_character_widths


bool get_character_widths(handle device,
                          unsigned first,
                          unsigned last,
                          int* widths)

This function obtains a range of widths of characters that are consecutive in the current font.

Parameters

handle device

The handle of a device context.

unsigned first

The code point of the first character in the font to be retrieved.

unsigned last

The code point of the last character in the font to be retrieved (must be >=first).

int* widths

A pointer to a buffer to hold the returned character widths.

Return

bool

true The function succeeded.
false The call failed.

Notes

The returned range is inclusive (required buffer size Last-First+1).

If no font character exists at a codepoint, the width of the default character in the font is returned.