At My Fingertips

Documentation

Documentation

Function from library pytamaro

text(contentfontpointscolor)

textcontentfontpointscolor

Creates a graphic with the text rendered using the specified font, size and color.

When the indicated True-Type Font is not found in the system, a very basilar font that is always available is used instead. The resulting graphic has the minimal size that still fits the whole text.

The pinning position is horizontally aligned on the left and vertically on the baseline of the text.

contentthe text to render

fontthe name of the font (e.g., “Arial” or “Fira Sans”)

pointssize in typographic points (e.g., 16)

colorthe color to be used to render the text

The specified text as a graphic
Code
show_graphic(text('PyTamaro', 'Fira Sans', 32, red))
Output
Graphical output from execution result

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version 4153f55 (Wed, 02 Apr 2025 06:58:19 GMT)