Code: Select all
''
FontType by rbytes
September 2017
Shows how to set normal, bold and/or italic styles
''
#.fontsize(30)
a = #.normal
b = #.bold
c = #.italic
c1 = "Some helpful "
c2 = "advice"
d = "Keep on "
e = "smiling."
f = "It does your face "
g = "good!"
#.drawtext(100,25,"You can use bold and/or italic text to highlight important words.")
#.drawcolor(.4,.4,1)
#.fontsize(60)
#.drawtext(100,75,c1)
#.fonttype(c)
#.drawtext(460,75,c2)
#.drawcolor(1,0,1)
#.fonttype(a)
#.drawtext(100,150,d)
#.fonttype(b)
#.drawtext(335,150,e)
#.drawcolor(0,.6,.6)
#.fonttype(a)
#.drawtext(100,225,f)
#.fonttype(b,c)
#.drawtext(555,225,g)
#.fonttype(a)
#.fontsize(30)
#.drawcolor(0,0,0)
#.drawtext(100,365,"But some specialty fonts may not show the results you expect")
#.fontname("Ranchers")
#.fontsize(60)
#.drawcolor(.4,.4,1)
#.drawtext(100,425,c1)
#.fonttype(c)
#.drawtext(400,425,c2)
#.drawcolor(1,0,1)
#.fonttype(a)
#.drawtext(100,510,d)
#.fonttype(b)
#.drawtext(300,510,e)
#.drawcolor(0,.6,.6)
#.fonttype(a)
#.drawtext(100,595,f)
#.fonttype(b,c)
#.drawtext(485,595,g)
#.fonttype(a)
#.fontname("default")
#.fontsize(30)
#.drawcolor(0,0,0)
#.drawtext(100,690,"Ranchers always looks bold, so using the bold command changes little.")