https://community.hobbyelektroniker.ch/wbb/index.php?thread/202-umlaute-und-sonderzeichen-auf-dem-oled-display-ssd1306/&postID=1336 https://github.com/peterhinch/micropython-font-to-py https://github.com/peterhinch/micropython-font-to-py/archive/refs/heads/master.zip entpacken in ein beliebiges Verzeichnis über Explorer aufsuchen und mit SHIFT + RK -> Powershell hier öffnen F:\P_programmieren\__knowhow\__Zeichensätze in MCP\micropython-font-to-py-master> https://github.com/peterhinch/micropython-font-to-py/blob/master/FONT_TO_PY.md https://github.com/peterhinch/micropython-font-to-py/blob/master/README.md Wandlung eines Fonts in F:\P_programmieren\__knowhow\__Zeichensätze in MCP\micropython-font-to-py-master> eingeben: Hinweis: der vollständige Pfad zur Zeichensatzdatei muss angegeben werden (über Name in Everything suchen lassen, Pfad öffnen, kopieren) .\font_to_py.py C:\Windows\WinSxS\amd64_microsoft-windows-font-truetype-arial_31bf3856ad364e35_10.0.19041.1_none_28747db34cb89a67\arial.ttf 20 arial_clock.py -c "1234567890," .\font_test.py arial_clock "01234" Vertical map Normal bit order Proportional spacing Dimensions height*max_width 20 * 13 Start char "," (ord 44) end char "?" (ord 63) ....#####...........##........#####........####.............##... ...#######..........##......#########....########..........###... ..###...###........###......##.....##....##....###........####... ..##.....##......#####.....##.......##..##......##........####... .##.......##....###.##.....##.......##..........##.......##.##... .##.......##....##..##..............##..........##......###.##... .##.......##........##..............##.........##.......##..##... .##.......##........##.............##.......####.......##...##... .##.......##........##............##........#####......##...##... .##.......##........##...........##.............##....##....##... .##.......##........##..........##...............##..###....##... .##.......##........##.........##................##..###########. .##.......##........##........##........##.......##..###########. ..##.....##.........##.......##.........##.......##.........##... ..###...###.........##......##...........##.....##..........##... ..########..........##.....###########....#######...........##... ....#####...........##.....###########.....#####............##... ................................................................. ................................................................. ................................................................. Das Verzeichnis _font2py mit den Programmen muss in X:\ liegen Laufwerksbuchstabe gegf. anpassen. Laufwerk kann auch ein USB-Laufwerk sein Zeichensätze nach F:\_font2py\quellen Powershell öffnen in F:\_font2py Entweder mit Batch-Datei makecharset.bat .\makecharset.bat fontname size """chars""" oder interaktiv Befehle: .\font_to_py.py F:\_font2py\quellen\name.ttf 30 -f name_size_meta.py .\font_test.py name_size_meta "0123456789,-*C" > name_size.txt .\text2py name size chars Beispiel: .\font_to_py.py F:\font2py\quellen\comicbd.ttf 16 -f comicbd_16_meta.py .\font_test.py comicbd_16_meta "0123456789,-*CAVW" > comicbd_16.txt .\text2py comicbd 16 "0123456789,-*CAVW" py-Module können in beliebige Programme aufgenommen werden, die OLEDs benutzen. ACHTUNG: Im interaktiven Modus der Shell muss in text2py.py def readln() so aussehen: def readln(): s="" while 1: c=f.read(1) a=ord(c) if a>10 and a<126: s+=c elif a==10: for i in range(3): # Im Batchmodus muss diese Zeile auskommentiert werden z=f.read(1) # Im Batchmodus muss diese Zeile auskommentiert werden break return s