Text & text on a path
Text(sketch, text, size) turns a string into closed outlines that you
extrude like any other shape. Holes in letters (“o”, “e”, “A”) are kept.
size is the font size, so capitals are about 0.7 × size tall, and
xshift / yshift move the baseline start.
Text uses the kernel’s default font (Roboto Regular) unless you pass
font_url= a TTF/OTF/WOFF URL or a data: URI.
TextOnPath(path, text, size) sets text along a curve. Each letter
sits on the path with its baseline tangent to it, reading in the path’s
direction of travel. The path can be a Line, an Arc, a Circle or a
custom open/closed shape.
startis the distance along the path where the text is anchored.align=TextPathAlign.START | CENTER | ENDsays whether the text begins, is centred or ends there.baseline_offsetlifts the letters off the path, towards the left of travel.- A
Circleruns clockwise from its leftmost point. To centre text over the top, usestart = π·r/2(a quarter of the way round) withalign=CENTER. - For text that reads upright along the bottom of a badge, draw an
Arcfrom left to right underneath, as above.