Author
Travis Kirton


System Fonts

There are 3 system fonts that you can easily create by simply specifying a size.

Font.systemFont(30.0)
Font.boldSystemFont(30.0)
Font.italicSystemFont(30.0)

Example

let dy = Vector(x: 0, y: canvas.height/4)
//create a regular system font
var label = TextShape(text: "Regular System Font", font: Font.systemFont(30.0))!
label.center = canvas.center - dy
canvas.add(label)

//create a bold system font
label = TextShape(text: "Bold System Font", font: Font.boldSystemFont(30.0))!
label.center = canvas.center
canvas.add(label)

//create a italic system font
label = TextShape(text: "Italic System Font", font: Font.italicSystemFont(30.0))!
label.center = canvas.center + dy
canvas.add(label)