From 1d76371354c6a7c8467ad65921319035419fc3b5 Mon Sep 17 00:00:00 2001 From: tiijay Date: Fri, 24 Oct 2025 18:12:34 +0200 Subject: [PATCH] v.0.4.4 fonts_3x5 corrected --- app/display/fonts/font_3x5.py | 93 ++++++++++++++++++----------------- app/tryout/fonts.py | 2 +- main.py | 2 +- 3 files changed, 51 insertions(+), 46 deletions(-) diff --git a/app/display/fonts/font_3x5.py b/app/display/fonts/font_3x5.py index 9876afc..a305891 100644 --- a/app/display/fonts/font_3x5.py +++ b/app/display/fonts/font_3x5.py @@ -1,20 +1,22 @@ font_3x5 = { + # Jedes Zeichen ist genau 3 Pixel breit, 5 Pixel hoch ' ': [0x00, 0x00, 0x00, 0x00, 0x00], '!': [0x01, 0x01, 0x01, 0x00, 0x01], '"': [0x05, 0x05, 0x00, 0x00, 0x00], '#': [0x05, 0x07, 0x05, 0x07, 0x05], - '$': [0x07, 0x06, 0x07, 0x03, 0x07], + '$': [0x07, 0x05, 0x07, 0x05, 0x07], '%': [0x05, 0x01, 0x02, 0x04, 0x05], - '&': [0x02, 0x05, 0x02, 0x05, 0x03], + '&': [0x02, 0x05, 0x02, 0x05, 0x06], "'": [0x01, 0x01, 0x00, 0x00, 0x00], - '(': [0x01, 0x02, 0x02, 0x02, 0x01], - ')': [0x02, 0x01, 0x01, 0x01, 0x02], + '(': [0x02, 0x04, 0x04, 0x04, 0x02], + ')': [0x04, 0x02, 0x02, 0x02, 0x04], '*': [0x00, 0x05, 0x02, 0x05, 0x00], '+': [0x00, 0x02, 0x07, 0x02, 0x00], - ',': [0x00, 0x00, 0x00, 0x01, 0x02], + ',': [0x00, 0x00, 0x00, 0x02, 0x04], '-': [0x00, 0x00, 0x07, 0x00, 0x00], - '.': [0x00, 0x00, 0x00, 0x00, 0x01], + '.': [0x00, 0x00, 0x00, 0x00, 0x02], '/': [0x01, 0x01, 0x02, 0x04, 0x04], + # Zahlen '0': [0x07, 0x05, 0x05, 0x05, 0x07], '1': [0x02, 0x06, 0x02, 0x02, 0x07], '2': [0x07, 0x01, 0x07, 0x04, 0x07], @@ -25,74 +27,77 @@ font_3x5 = { '7': [0x07, 0x01, 0x01, 0x01, 0x01], '8': [0x07, 0x05, 0x07, 0x05, 0x07], '9': [0x07, 0x05, 0x07, 0x01, 0x07], - ':': [0x00, 0x01, 0x00, 0x01, 0x00], - ';': [0x00, 0x01, 0x00, 0x01, 0x02], - '<': [0x01, 0x02, 0x04, 0x02, 0x01], - '=': [0x00, 0x07, 0x00, 0x07, 0x00], - '>': [0x04, 0x02, 0x01, 0x02, 0x04], - '?': [0x07, 0x01, 0x02, 0x00, 0x02], - '@': [0x07, 0x05, 0x07, 0x04, 0x07], + # Großbuchstaben 'A': [0x02, 0x05, 0x07, 0x05, 0x05], 'B': [0x06, 0x05, 0x06, 0x05, 0x06], 'C': [0x07, 0x04, 0x04, 0x04, 0x07], 'D': [0x06, 0x05, 0x05, 0x05, 0x06], - 'E': [0x07, 0x04, 0x06, 0x04, 0x07], - 'F': [0x07, 0x04, 0x06, 0x04, 0x04], + 'E': [0x07, 0x04, 0x07, 0x04, 0x07], + 'F': [0x07, 0x04, 0x07, 0x04, 0x04], 'G': [0x07, 0x04, 0x05, 0x05, 0x07], 'H': [0x05, 0x05, 0x07, 0x05, 0x05], 'I': [0x07, 0x02, 0x02, 0x02, 0x07], - 'J': [0x01, 0x01, 0x01, 0x05, 0x02], + 'J': [0x07, 0x02, 0x02, 0x02, 0x06], 'K': [0x05, 0x05, 0x06, 0x05, 0x05], 'L': [0x04, 0x04, 0x04, 0x04, 0x07], 'M': [0x05, 0x07, 0x07, 0x05, 0x05], 'N': [0x05, 0x07, 0x07, 0x07, 0x05], - 'O': [0x02, 0x05, 0x05, 0x05, 0x02], - 'P': [0x06, 0x05, 0x06, 0x04, 0x04], - 'Q': [0x02, 0x05, 0x05, 0x06, 0x03], - 'R': [0x06, 0x05, 0x06, 0x05, 0x05], - 'S': [0x07, 0x04, 0x02, 0x01, 0x07], + 'O': [0x07, 0x05, 0x05, 0x05, 0x07], + 'P': [0x07, 0x05, 0x07, 0x04, 0x04], + 'Q': [0x07, 0x05, 0x05, 0x07, 0x03], + 'R': [0x07, 0x05, 0x06, 0x05, 0x05], + 'S': [0x07, 0x04, 0x07, 0x01, 0x07], 'T': [0x07, 0x02, 0x02, 0x02, 0x02], 'U': [0x05, 0x05, 0x05, 0x05, 0x07], 'V': [0x05, 0x05, 0x05, 0x05, 0x02], 'W': [0x05, 0x05, 0x07, 0x07, 0x05], 'X': [0x05, 0x05, 0x02, 0x05, 0x05], - 'Y': [0x05, 0x05, 0x02, 0x02, 0x02], + 'Y': [0x05, 0x05, 0x07, 0x02, 0x02], 'Z': [0x07, 0x01, 0x02, 0x04, 0x07], - '[': [0x03, 0x02, 0x02, 0x02, 0x03], - '\\': [0x04, 0x04, 0x02, 0x01, 0x01], - ']': [0x03, 0x01, 0x01, 0x01, 0x03], - '^': [0x02, 0x05, 0x00, 0x00, 0x00], - '_': [0x00, 0x00, 0x00, 0x00, 0x07], - '`': [0x02, 0x01, 0x00, 0x00, 0x00], - 'a': [0x00, 0x07, 0x05, 0x05, 0x03], - 'b': [0x04, 0x04, 0x06, 0x05, 0x06], + # Kleinbuchstaben + 'a': [0x00, 0x07, 0x05, 0x05, 0x07], + 'b': [0x04, 0x06, 0x05, 0x05, 0x06], 'c': [0x00, 0x07, 0x04, 0x04, 0x07], - 'd': [0x01, 0x01, 0x07, 0x05, 0x07], + 'd': [0x01, 0x07, 0x05, 0x05, 0x07], 'e': [0x00, 0x07, 0x07, 0x04, 0x07], 'f': [0x03, 0x04, 0x06, 0x04, 0x04], - 'g': [0x00, 0x07, 0x05, 0x07, 0x01], - 'h': [0x04, 0x04, 0x06, 0x05, 0x05], - 'i': [0x01, 0x00, 0x01, 0x01, 0x01], - 'j': [0x01, 0x00, 0x01, 0x01, 0x06], + 'g': [0x07, 0x05, 0x07, 0x01, 0x06], + 'h': [0x04, 0x06, 0x05, 0x05, 0x05], + 'i': [0x02, 0x00, 0x02, 0x02, 0x02], + 'j': [0x02, 0x00, 0x02, 0x02, 0x06], 'k': [0x04, 0x05, 0x06, 0x05, 0x05], - 'l': [0x06, 0x02, 0x02, 0x02, 0x07], - 'm': [0x00, 0x05, 0x07, 0x05, 0x05], + 'l': [0x06, 0x02, 0x02, 0x02, 0x02], + 'm': [0x00, 0x07, 0x07, 0x05, 0x05], 'n': [0x00, 0x06, 0x05, 0x05, 0x05], - 'o': [0x00, 0x02, 0x05, 0x05, 0x02], + 'o': [0x00, 0x07, 0x05, 0x05, 0x07], 'p': [0x00, 0x06, 0x05, 0x06, 0x04], 'q': [0x00, 0x07, 0x05, 0x07, 0x01], - 'r': [0x00, 0x03, 0x04, 0x04, 0x04], + 'r': [0x00, 0x06, 0x05, 0x04, 0x04], 's': [0x00, 0x07, 0x06, 0x03, 0x07], - 't': [0x04, 0x07, 0x04, 0x04, 0x03], + 't': [0x02, 0x07, 0x02, 0x02, 0x03], 'u': [0x00, 0x05, 0x05, 0x05, 0x07], 'v': [0x00, 0x05, 0x05, 0x05, 0x02], 'w': [0x00, 0x05, 0x05, 0x07, 0x05], 'x': [0x00, 0x05, 0x02, 0x02, 0x05], 'y': [0x00, 0x05, 0x05, 0x07, 0x01], 'z': [0x00, 0x07, 0x02, 0x04, 0x07], - '|': [0x01, 0x01, 0x01, 0x01, 0x01], - '~': [0x00, 0x03, 0x06, 0x00, 0x00], + # Sonderzeichen + ':': [0x00, 0x02, 0x00, 0x02, 0x00], + ';': [0x00, 0x02, 0x00, 0x02, 0x04], + '<': [0x01, 0x02, 0x04, 0x02, 0x01], + '=': [0x00, 0x07, 0x00, 0x07, 0x00], + '>': [0x04, 0x02, 0x01, 0x02, 0x04], + '?': [0x07, 0x01, 0x02, 0x00, 0x02], + '@': [0x07, 0x05, 0x05, 0x04, 0x07], + '[': [0x07, 0x04, 0x04, 0x04, 0x07], + '\\': [0x04, 0x04, 0x02, 0x01, 0x01], + ']': [0x07, 0x01, 0x01, 0x01, 0x07], + '^': [0x02, 0x05, 0x00, 0x00, 0x00], + '_': [0x00, 0x00, 0x00, 0x00, 0x07], + '`': [0x04, 0x02, 0x00, 0x00, 0x00], + '{': [0x03, 0x02, 0x06, 0x02, 0x03], + '|': [0x02, 0x02, 0x02, 0x02, 0x02], + '}': [0x06, 0x02, 0x03, 0x02, 0x06], + '~': [0x00, 0x05, 0x0A, 0x00, 0x00], '°': [0x02, 0x05, 0x02, 0x00, 0x00], - '¶': [0x07, 0x05, 0x05, 0x05, 0x05], - '•': [0x00, 0x00, 0x01, 0x00, 0x00], } diff --git a/app/tryout/fonts.py b/app/tryout/fonts.py index 5441c06..db40e5e 100644 --- a/app/tryout/fonts.py +++ b/app/tryout/fonts.py @@ -27,7 +27,7 @@ def fonts_check(display: NeoPixel_64x64, font, pretty=False) -> None: for idx, row_text in enumerate(scr_txt_dict['visible']): ypos = height * idx # display.clear_row(ypos) - display.write_text(row_text, 0, ypos, colors.RAINBOW[idx]) + display.write_text(row_text, 0, ypos, colors.RAINBOW[idx % 6]) text_left = scr_txt_dict['invisible'] diff --git a/main.py b/main.py index 631b887..0e40d19 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,6 @@ if __name__ == '__main__': display = NeoPixel_64x64() # tryout.emojis_check(display) - tryout.fonts_check(display, fonts.font_16x16, pretty=False) + tryout.fonts_check(display, fonts.font_8x8, pretty=False) # tryout.weather_check(display, test_mode=True) utils.show_system_load()