ictdesigntools.draw.text¶
Text sizes without a font engine: widths from Helvetica's published metrics (the face every output falls back to), close enough to fit labels to the space they have.
text_width ¶
The width of text set at size (the em height), in the same units.
Source code in src/ictdesigntools/draw/text.py
fit_size ¶
The largest size up to size at which text fits in width, or None when it
would have to be smaller than smallest.
Source code in src/ictdesigntools/draw/text.py
truncate ¶
text cut short with ellipsis to fit width at size; "" if nothing fits.
Source code in src/ictdesigntools/draw/text.py
wrap ¶
text broken into lines at spaces to fit width; a word longer than the width is
left on a line of its own.