aboutsummaryrefslogtreecommitdiff
path: root/host/bdf.py
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-01-04 21:14:55 +0100
committerjaseg <code@jaseg.net>2016-01-04 21:14:55 +0100
commitcae13443bce201ccae54fb0aa99b44a008eb9d4d (patch)
tree9d07b70293016da2a74dce4299b59c11e2e646d5 /host/bdf.py
parentdfca7a95a30baf0cc6e375e6c38a22e00e699f6b (diff)
downloadmatelight-cae13443bce201ccae54fb0aa99b44a008eb9d4d.tar.gz
matelight-cae13443bce201ccae54fb0aa99b44a008eb9d4d.tar.bz2
matelight-cae13443bce201ccae54fb0aa99b44a008eb9d4d.zip
Re-add spam filtering, improve length marquee limiting
Diffstat (limited to 'host/bdf.py')
-rw-r--r--host/bdf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/bdf.py b/host/bdf.py
index a8fc8f3..fb4c928 100644
--- a/host/bdf.py
+++ b/host/bdf.py
@@ -40,7 +40,7 @@ class Font:
textw, texth = c_size_t(0), c_size_t(0)
res = lib.framebuffer_get_text_bounds(textbytes, self.font, byref(textw), byref(texth))
if res:
- raise ValueError('Invalid text')
+ raise RuntimeError('Invalid text')
return textw.value, texth.value
def render_text(self, text, offset):
@@ -49,7 +49,7 @@ class Font:
res = lib.framebuffer_render_text(textbytes, self.font, self.cbuf,
config.display_width, config.display_height, offset)
if res:
- raise ValueError('Invalid text')
+ raise RuntimeError('Invalid text')
return self.cbuf
unifont = Font()