Contents

Text

Learn how draw text

✏️ Suggest an edit to this page »

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',
  size: 20,
  color: 'blue',
  rotate: 90,
  z: 10
)

Continue to the next topic »