| Search Locate Previous Next | Contents |
This is a simple utility to measure text (typically for notes). Accepts simple strings or text arrays, and uses the normal wrapping rules on strings. Returns the width of the longest line as a decimal value in points.
note'Hello in;left-justified, centred;text (at 15,12)' twchTextWidth note chSet'nnudge'(-0.5×tw)
This could be used (as in the example) to centre a block of left-aligned text. The left argument may be used to pass a font specification this defaults to the current note font if not given.
See also ...
chNote add chart notes
NoteNudge Nudge note position