2 Text Katas
2.1 Text Kata (text-1)
Tip: The default font size is 13.
read
Code a cutscene that has big text and purple text.
code
#lang cutscene (story-cutscene (page (make-text "BIG tex.t" #:font-size 20) (make-text "Purple text." #:color 'purple)))
2.2 Text Kata (text-2)
Tip: The font styles are: ’normal, ’italic, and ’slant.
read
Code a cutscene that has red text and italized text.
code
#lang cutscene (story-cutscene (page (make-text "Red text." #:color 'red) (make-text "Italicized text." #:font-style 'italic)))
2.3 Text Kata (text-3)
read
Code a cutscene that has small, slanted text.
code
#lang cutscene (story-cutscene (page (make-text "This font is slanted and small." #:font-style 'slant #:font-size 8)))
2.4 Text Kata (text-4)
Tip: To change the font family, the font face needs to be set to #f. The font family options are: ’default, ’decorative, ’roman, ’script, ’swiss, ’modern, ’symbol, and ’system
read
Code a cutscene that has a font with a custom family and weight.
code
#lang cutscene (story-cutscene (page (make-text "This font family is system and is bolded." #:font-face #f #:font-family 'system #:font-weight 800)))
2.5 Text Kata (text-5)
Tip: The font weight can be any value between 100 and 1000.
read
Code a cutscene where each line of text is different.
code
#lang cutscene (story-cutscene (page (make-text "Each") (make-text "line" #:color 'green #:font-size 14 #:underlined? #t) (make-text "of" #:color 'blue #:font-size 15 #:font-weight 500) (make-text "text" #:color 'purple #:font-size 17 #:font-style 'italic) (make-text "is" #:color 'orange #:font-size 16 #:font-face #f #:font-family 'roman) (make-text "DIFFERENT!" #:color 'red #:font-size 20 #:font-family 'script #:font-weight 800)))