Macaw OS C reference

Function textwidth

#include <macaw.h>
int textwidth(const char *s);

Measures how wide some text would be, so you can line it up before you write it.

Parameters

sconst char *
The text to measure.

Returns int

Its width in pixels: 6 for each character, or the widest line's width if it has more than one.

In Drawing, with cls, pset, pget, line, rect, rectfill, circ, circfill, tri, text, clip, noclip, camera, box, centertext, shadowtext, textscaled, wraptext, wrapline.