diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-09-29 12:53:09 +0200 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-09-29 12:53:09 +0200 |
commit | 88ad5323c218c87b1c30521f12e8f09825347696 (patch) | |
tree | 1fd5734c7b875ff2dd80a5d09c92894f43962f6b | |
parent | 6d09959455ecc80cafeb411701b3294aad958759 (diff) |
feat(anzeigetafel): default to GNU Unifont
Bitmap font with the perfect pixel height (16) for our use case. If we get Unifont Upper as fallback font to work, we'll have pretty good unicode coverage as well (some scripts don't work perfectly in Unifont, but for us mostly Latin script plus Emojis is interesting).
-rwxr-xr-x[-rw-r--r--] | anzeigetafel/anzeigetafel.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/anzeigetafel/anzeigetafel.py b/anzeigetafel/anzeigetafel.py index bc1c58d..6205e4e 100644..100755 --- a/anzeigetafel/anzeigetafel.py +++ b/anzeigetafel/anzeigetafel.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import os import sys import requests @@ -12,6 +13,11 @@ else: BASEURL = 'https://flipdot.openlab-augsburg.de/api/v2' +FLIPDOT_HOST = 'localhost' +FLIPDOT_PORT = 2323 + +FONT = '/usr/share/fonts/truetype/unifont/unifont.ttf' + def get_queue(): r = requests.get(BASEURL + '/queue') return r.json()['queue'] @@ -39,7 +45,7 @@ while True: print("Drawing string \"{}\" with id {}".format(text.encode("utf-8"), id)) - scroll_text("localhost", 2323, "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", text) + scroll_text(FLIPDOT_HOST, FLIPDOT_PORT, FONT, text) (sucess, status) = delete_queue_entry(id) |