Font Types

Post Reply
User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Font Types

Post by rbytes »

Here is a program that demonstrates the three font types - normal, bold and italics.

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.")
Attachments
Screenshot (54).png
Screenshot (54).png (123.99 KiB) Viewed 2717 times
The only thing that gets me down is gravity...

Post Reply