All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

compute-char-extents Function

Summary

Returns the x coordinates of the end of each of the characters in a string if the string was printed to a graphics port.

Package

graphics-ports

Signature

compute-char-extents port string &optional font => extents

Arguments
port
A CAPI pane.
string
A string.
font
A font.
Values
extents
An array of integers.
Description

The function compute-char-extents returns the extents of the characters in string in the font associated with port, or of font if given. The extents are an array, one element per character, which gives the ending x coordinate of that character if the string was drawn to port.

Note: To compute the extents of the entire string for a given port or font, use port-string-width or get-string-extent.

See also

get-string-extent
port-string-width


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44