summaryrefslogtreecommitdiff
path: root/tests/render.py
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-01-04 22:43:26 +0100
committerLaurenz <laurmaedje@gmail.com>2020-01-04 22:43:26 +0100
commit7b84f3b553de672e5374e142467f63b10009aeca (patch)
treefd8265abc8c62213520628babc0cfc3a6f8e98aa /tests/render.py
parent5dfaffc5bdfa811c135f0140c0a0ba917eb8c70f (diff)
Adopt new font loading engine ⚙
Diffstat (limited to 'tests/render.py')
-rw-r--r--tests/render.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/render.py b/tests/render.py
index fe7a1de4..1387ed53 100644
--- a/tests/render.py
+++ b/tests/render.py
@@ -35,10 +35,10 @@ class MultiboxRenderer:
self.fonts = {}
font_count = int(lines[0])
for i in range(font_count):
- parts = lines[i + 1].split(' ', 1)
- index = int(parts[0])
- path = parts[1]
- self.fonts[index] = os.path.join(BASE, '../fonts', path)
+ parts = lines[i + 1].split(' ', 2)
+ index = int(parts[0]), int(parts[1])
+ path = parts[2]
+ self.fonts[index] = os.path.join(BASE, '../../fonts', path)
self.content = lines[font_count + 1:]
@@ -136,8 +136,8 @@ class BoxRenderer:
self.cursor = [x, y]
elif cmd == 'f':
- index = int(parts[0])
- size = pix(float(parts[1]))
+ index = int(parts[0]), int(parts[1])
+ size = pix(float(parts[2]))
self.font = ImageFont.truetype(self.fonts[index], size)
elif cmd == 'w':