📘 Sets the current font to be used for rendering text.
By default, the font is set to the CSS font family "sans-serif" or the last font loaded.
name of the font family or a FontFace object
await Canvas(200, 160);background(0.8);textFont('serif');text('Hello, world!', -96, 10); Copy
await Canvas(200, 160);background(0.8);textFont('serif');text('Hello, world!', -96, 10);
await Canvas(200);background(0.8);textFont('monospace');text('Hello, world!', -96, 10); Copy
await Canvas(200);background(0.8);textFont('monospace');text('Hello, world!', -96, 10);
📘 Sets the current font to be used for rendering text.
By default, the font is set to the CSS font family "sans-serif" or the last font loaded.