-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
35 lines (28 loc) · 1.13 KB
/
tests.py
File metadata and controls
35 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# A script to test the textbox generator
import textbox
features = textbox.Features()
fonts = features.listFonts()
backgrounds = features.listBackgrounds()
testLines = [
"Test line one",
"Test line two",
"A slightly longer test line",
"A test line that that is much longer than the last one",
"CAPTIAL LETTER TEST",
"a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9"
]
longLine = "This is a very long line that the code will have to split into multiple textboxes to make it work and fit all the text in"
outputFolder = "/tmp/"
avatar = "/tmp/sans.png"
for background in backgrounds :
for font in fonts :
print("background : " + background + "\nfont : " + font)
features.setBackground(background)
features.setFont(font)
# features.setAvatar(avatar)
features.setColor((127, 127, 127))
generator = textbox.Generate(features)
generator.bulkMake(testLines, outputFolder)
input("Array generating done, check " + outputFolder)
generator.bulkMake(longLine, outputFolder)
input("String generating done, check " + outputFolder)