Contents

Text

Learn how draw text

Text with OpenType fonts (.ttf or .otf file extension) can be drawn in the window like so:

Text.new('Hello')

Here are all the possible instance attributes:

Text.new(
  'Hello',
  x: 150, y: 470,
  font: 'vera.ttf',
  style: 'bold',
  size: 20,
  color: 'blue',
  rotate: 90,
  z: 10
)

Continue to the next topic ▸


✏️ Suggest an edit to this page