aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display/st7920.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/display/st7920.py')
-rw-r--r--klippy/extras/display/st7920.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/klippy/extras/display/st7920.py b/klippy/extras/display/st7920.py
index 4ccfcd24..f76e523a 100644
--- a/klippy/extras/display/st7920.py
+++ b/klippy/extras/display/st7920.py
@@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging
-import icons
+import icons, font8x14
BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
@@ -13,6 +13,7 @@ ST7920_CMD_DELAY = .000020
ST7920_SYNC_DELAY = .000045
TextGlyphs = { 'right_arrow': '\x1a' }
+CharGlyphs = { 'degrees': font8x14.VGA_FONT[0xf8] }
class ST7920:
def __init__(self, config):
@@ -145,6 +146,12 @@ class ST7920:
# Draw character
self.write_text(x, y, char)
return 1
+ font = CharGlyphs.get(glyph_name)
+ if font is not None:
+ # Draw single width character
+ for i, bits in enumerate(font):
+ self.write_graphics(x, y, i, [bits])
+ return 1
return 0
def clear(self):
self.text_framebuffer[0][:] = ' '*64