display: Move glyph definition to printer config

This commit allows to modify the icons (or glyphs) in the displays that
support it. Existing icons can be modified and new icons can be added via
a [display_glyph] section in the config.

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
Florian Heilmann 2020-06-07 16:25:19 +00:00 committed by KevinOConnor
parent 722770f62f
commit 3dcac1308e
7 changed files with 196 additions and 173 deletions

View file

@ -95,6 +95,8 @@ class HD44780:
data = data[:20 - min(x, 20)]
pos = x + ((y & 0x02) >> 1) * 20
self.text_framebuffers[y & 1][pos:pos+len(data)] = data
def set_glyphs(self, glyphs):
pass
def write_glyph(self, x, y, glyph_name):
char = TextGlyphs.get(glyph_name)
if char is not None: