kopia lustrzana https://github.com/peterhinch/micropython-samples
SSD1306: writer uses blitting.
rodzic
dacf38a22e
commit
5a03136d8d
|
@ -1,242 +0,0 @@
|
|||
# Code generated by font-to-py.py.
|
||||
# Font: FreeSerif.ttf
|
||||
version = '0.1'
|
||||
|
||||
def height():
|
||||
return 19
|
||||
|
||||
def max_width():
|
||||
return 19
|
||||
|
||||
def hmap():
|
||||
return False
|
||||
|
||||
def reverse():
|
||||
return False
|
||||
|
||||
def monospaced():
|
||||
return False
|
||||
|
||||
_font =\
|
||||
b'\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x07\x00\xfe\x31\x00\x7e\x30\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x1f\x00\x00\x0f\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x0f\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x0a\x00\x00\x02\x00\x20\x02\x00\x20\x3f\x00\xfc\x03\x00'\
|
||||
b'\x26\x02\x00\x20\x02\x00\xa0\x3f\x00\xfe\x02\x00\x22\x02\x00\x20'\
|
||||
b'\x00\x00\x0a\x00\x38\x1c\x00\x7c\x30\x00\x66\x20\x00\xc2\x20\x00'\
|
||||
b'\xff\x7f\x00\x82\x21\x00\x86\x31\x00\x0c\x1f\x00\x00\x0e\x00\x00'\
|
||||
b'\x00\x00\x11\x00\x78\x00\x00\xfc\x01\x00\x0c\x01\x00\x06\x21\x00'\
|
||||
b'\x82\x10\x00\xc2\x0c\x00\x3c\x03\x00\xc4\x00\x00\x24\x1e\x00\x1c'\
|
||||
b'\x3f\x00\x86\x23\x00\xc0\x20\x00\x40\x30\x00\x40\x18\x00\x80\x07'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x1e\x00\x00\x3f\x00\x80'\
|
||||
b'\x31\x00\xbc\x20\x00\xfe\x20\x00\xe1\x21\x00\xa1\x27\x00\x11\x1e'\
|
||||
b'\x00\x0e\x1c\x00\x20\x32\x00\xe0\x21\x00\x60\x20\x00\x20\x20\x00'\
|
||||
b'\x00\x10\x00\x00\x00\x00\x00\x00\x00\x04\x00\x1f\x00\x00\x0f\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x07\x00\xc0\x0f\x00\xf0\x3f\x00\x18'\
|
||||
b'\x60\x00\x04\x80\x00\x02\x00\x01\x00\x00\x00\x00\x00\x00\x07\x00'\
|
||||
b'\x02\x00\x01\x04\x80\x00\x18\x60\x00\xf0\x3f\x00\xc0\x0f\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x4c\x00\x00\xb2\x01\x00\xfe\x01\x00'\
|
||||
b'\x30\x00\x00\x48\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0b\x00\x00\x02\x00\x00\x02\x00\x00\x02\x00'\
|
||||
b'\x00\x02\x00\xe0\x3f\x00\x00\x02\x00\x00\x02\x00\x00\x02\x00\x00'\
|
||||
b'\x02\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x01\x00\xb0\x00'\
|
||||
b'\x00\x70\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x02\x00\x00\x02'\
|
||||
b'\x00\x00\x02\x00\x00\x02\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x05\x00\x00\x30\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x06\x00\x00\x20\x00\x00\x3c\x00\x80\x07\x00\xf0\x00\x00\x1e'\
|
||||
b'\x00\x00\x03\x00\x00\x0a\x00\xf0\x03\x00\xfc\x0f\x00\x06\x18\x00'\
|
||||
b'\x03\x30\x00\x01\x20\x00\x01\x20\x00\x03\x30\x00\x06\x18\x00\xfc'\
|
||||
b'\x0f\x00\xf0\x03\x00\x0a\x00\x02\x00\x00\x02\x20\x00\xff\x3f\x00'\
|
||||
b'\xff\x3f\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x18\x20\x00\x04\x30\x00\x02\x38\x00'\
|
||||
b'\x02\x2c\x00\x02\x26\x00\x86\x21\x00\xfc\x20\x00\x38\x20\x00\x00'\
|
||||
b'\x10\x00\x00\x00\x00\x0a\x00\x04\x20\x00\x02\x20\x00\x42\x20\x00'\
|
||||
b'\x62\x20\x00\xe6\x20\x00\xfe\x10\x00\xcc\x0f\x00\x80\x07\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x00\x07\x00\x80\x04\x00\x60\x04\x00'\
|
||||
b'\x10\x04\x00\x08\x04\x00\xfc\x3f\x00\xfe\x3f\x00\x00\x04\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x00\x20\x00\x10\x20\x00\x3c\x20\x00'\
|
||||
b'\x32\x20\x00\x32\x20\x00\xe2\x10\x00\xe2\x0f\x00\xc2\x07\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\xe0\x07\x00\xf8\x1f\x00\x7c\x18\x00'\
|
||||
b'\x2c\x20\x00\x26\x20\x00\x22\x20\x00\x63\x30\x00\xc1\x1f\x00\x81'\
|
||||
b'\x0f\x00\x00\x00\x00\x0a\x00\x04\x00\x00\x02\x00\x00\x02\x00\x00'\
|
||||
b'\x02\x30\x00\x02\x0e\x00\xc2\x01\x00\x3a\x00\x00\x06\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x1c\x0e\x00\x3e\x1f\x00\xf3\x30\x00'\
|
||||
b'\x61\x20\x00\xc1\x20\x00\xa3\x31\x00\x1e\x1f\x00\x1c\x0e\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x7c\x00\x00\xfe\x40\x00\x83\x61\x00'\
|
||||
b'\x01\x31\x00\x01\x39\x00\x03\x1f\x00\xfe\x07\x00\xf8\x01\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x05\x00\x60\x30\x00\x60\x30\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x05\x00\x60\x00\x01\x60\xb0\x00\x00\x70'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x03\x00\x80\x03\x00\x80'\
|
||||
b'\x06\x00\xc0\x04\x00\x40\x0c\x00\x60\x08\x00\x20\x18\x00\x30\x10'\
|
||||
b'\x00\x10\x10\x00\x10\x30\x00\x00\x00\x00\x0b\x00\x80\x08\x00\x80'\
|
||||
b'\x08\x00\x80\x08\x00\x80\x08\x00\x80\x08\x00\x80\x08\x00\x80\x08'\
|
||||
b'\x00\x80\x08\x00\x80\x08\x00\x80\x08\x00\x00\x00\x00\x0b\x00\x30'\
|
||||
b'\x20\x00\x20\x20\x00\x20\x30\x00\x60\x10\x00\x40\x18\x00\xc0\x08'\
|
||||
b'\x00\x80\x0c\x00\x80\x05\x00\x00\x07\x00\x00\x03\x00\x00\x00\x00'\
|
||||
b'\x09\x00\x0e\x00\x00\x02\x00\x00\x01\x00\x00\x01\x30\x00\x81\x37'\
|
||||
b'\x00\x7f\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\xe0'\
|
||||
b'\x03\x00\xf8\x07\x00\x1c\x0c\x00\x06\x18\x00\x82\x13\x00\xe1\x27'\
|
||||
b'\x00\x71\x24\x00\x11\x24\x00\x11\x22\x00\xe1\x27\x00\x72\x24\x00'\
|
||||
b'\x06\x14\x00\x0c\x02\x00\xf0\x01\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x0e\x00\x00\x20\x00\x00\x30\x00\x00\x38\x00\x00\x27\x00'\
|
||||
b'\xc0\x03\x00\x30\x02\x00\x0c\x02\x00\x3e\x02\x00\xf8\x02\x00\xc0'\
|
||||
b'\x23\x00\x00\x3f\x00\x00\x3c\x00\x00\x30\x00\x00\x20\x00\x0d\x00'\
|
||||
b'\x02\x20\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x82\x20\x00\x82'\
|
||||
b'\x20\x00\x82\x20\x00\x82\x20\x00\x82\x20\x00\x46\x31\x00\x7c\x1f'\
|
||||
b'\x00\x38\x0e\x00\x00\x00\x00\x0d\x00\xf0\x03\x00\xfc\x0f\x00\x0e'\
|
||||
b'\x1c\x00\x02\x10\x00\x03\x30\x00\x01\x20\x00\x01\x20\x00\x01\x20'\
|
||||
b'\x00\x01\x20\x00\x02\x20\x00\x0e\x10\x00\x1f\x08\x00\x00\x00\x00'\
|
||||
b'\x0e\x00\x02\x20\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x02\x20'\
|
||||
b'\x00\x02\x20\x00\x02\x20\x00\x02\x20\x00\x06\x20\x00\x04\x30\x00'\
|
||||
b'\x0c\x18\x00\x1c\x1c\x00\xf8\x0f\x00\xe0\x03\x00\x0c\x00\x02\x20'\
|
||||
b'\x00\xfe\x3f\x00\xfe\x3f\x00\x82\x20\x00\x82\x20\x00\x82\x20\x00'\
|
||||
b'\x82\x20\x00\x82\x20\x00\xc2\x21\x00\x06\x30\x00\x00\x08\x00\x00'\
|
||||
b'\x00\x00\x0b\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x82\x20\x00'\
|
||||
b'\x82\x00\x00\x82\x00\x00\x82\x00\x00\x82\x00\x00\xc2\x01\x00\x06'\
|
||||
b'\x00\x00\x00\x00\x00\x0e\x00\xf0\x03\x00\xfc\x0f\x00\x0e\x1c\x00'\
|
||||
b'\x02\x10\x00\x03\x30\x00\x01\x20\x00\x01\x20\x00\x01\x20\x00\x01'\
|
||||
b'\x20\x00\x42\x20\x00\xc6\x1f\x00\xcf\x1f\x00\x40\x00\x00\x00\x00'\
|
||||
b'\x00\x0e\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x82\x20\x00\x80'\
|
||||
b'\x00\x00\x80\x00\x00\x80\x00\x00\x80\x00\x00\x82\x20\x00\xfe\x3f'\
|
||||
b'\x00\xfe\x3f\x00\x02\x20\x00\x00\x00\x00\x00\x00\x00\x07\x00\x02'\
|
||||
b'\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x02\x20\x00\x02\x20\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x00\x30\x00\x00\x30\x00\x00\x20\x00\x02'\
|
||||
b'\x20\x00\xfe\x1f\x00\xfe\x0f\x00\x02\x00\x00\x00\x00\x00\x0e\x00'\
|
||||
b'\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x82\x20\x00\xc0\x01\x00\xa0'\
|
||||
b'\x01\x00\x30\x03\x00\x1a\x26\x00\x0e\x3c\x00\x06\x38\x00\x02\x30'\
|
||||
b'\x00\x02\x20\x00\x00\x20\x00\x00\x00\x00\x0c\x00\x02\x20\x00\xfe'\
|
||||
b'\x3f\x00\xfe\x3f\x00\x02\x20\x00\x00\x20\x00\x00\x20\x00\x00\x20'\
|
||||
b'\x00\x00\x20\x00\x00\x20\x00\x00\x30\x00\x00\x38\x00\x00\x08\x00'\
|
||||
b'\x12\x00\x02\x00\x00\x02\x20\x00\xfe\x3f\x00\x1e\x20\x00\x7e\x00'\
|
||||
b'\x00\xf8\x01\x00\xe0\x03\x00\x80\x0f\x00\x00\x3e\x00\x00\x0c\x00'\
|
||||
b'\x00\x03\x00\xc0\x00\x00\x30\x00\x00\x0c\x20\x00\xfe\x3f\x00\xfe'\
|
||||
b'\x3f\x00\x02\x20\x00\x00\x00\x00\x0f\x00\x02\x20\x00\xfe\x3f\x00'\
|
||||
b'\x0e\x20\x00\x3c\x00\x00\x78\x00\x00\xe0\x00\x00\xc0\x01\x00\x80'\
|
||||
b'\x03\x00\x00\x0f\x00\x02\x1c\x00\xfe\x3f\x00\x02\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x0e\x00\xf0\x03\x00\xfc\x0f\x00\x0e'\
|
||||
b'\x1c\x00\x02\x10\x00\x01\x20\x00\x01\x20\x00\x01\x20\x00\x01\x20'\
|
||||
b'\x00\x02\x10\x00\x0e\x1c\x00\xfc\x0f\x00\xf0\x03\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x0c\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x02\x21'\
|
||||
b'\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00\x86\x01\x00\xfc\x00\x00'\
|
||||
b'\x78\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\xf0\x03\x00\xfc\x0f'\
|
||||
b'\x00\x0e\x18\x00\x02\x30\x00\x01\x20\x00\x01\x60\x00\x01\xe0\x00'\
|
||||
b'\x01\xe0\x01\x02\xb0\x01\x0e\x1c\x03\xfc\x0f\x02\xf0\x03\x02\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0d\x00\x02\x20\x00\xfe\x3f\x00\xfe\x3f\x00'\
|
||||
b'\x82\x20\x00\x82\x00\x00\x82\x03\x00\x82\x07\x00\x46\x0e\x00\x7c'\
|
||||
b'\x1c\x00\x38\x38\x00\x00\x30\x00\x00\x20\x00\x00\x00\x00\x0b\x00'\
|
||||
b'\x00\x04\x00\x1c\x38\x00\x3e\x10\x00\x73\x20\x00\x61\x20\x00\xc1'\
|
||||
b'\x20\x00\xc1\x20\x00\x82\x31\x00\x87\x1f\x00\x08\x0f\x00\x00\x00'\
|
||||
b'\x00\x0c\x00\x0e\x00\x00\x06\x00\x00\x02\x00\x00\x02\x00\x00\x02'\
|
||||
b'\x20\x00\xfe\x3f\x00\xfe\x3f\x00\x02\x20\x00\x02\x00\x00\x02\x00'\
|
||||
b'\x00\x06\x00\x00\x0e\x00\x00\x0e\x00\x02\x00\x00\xfe\x0f\x00\xfe'\
|
||||
b'\x1f\x00\x02\x30\x00\x00\x20\x00\x00\x20\x00\x00\x20\x00\x00\x20'\
|
||||
b'\x00\x00\x20\x00\x02\x10\x00\xfe\x0f\x00\x02\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x0e\x00\x02\x00\x00\x06\x00\x00\x0e\x00\x00\x3e\x00'\
|
||||
b'\x00\xf2\x00\x00\xc2\x03\x00\x00\x0f\x00\x00\x3c\x00\x00\x0e\x00'\
|
||||
b'\x80\x01\x00\x62\x00\x00\x1e\x00\x00\x06\x00\x00\x02\x00\x00\x13'\
|
||||
b'\x00\x02\x00\x00\x06\x00\x00\x1e\x00\x00\x7e\x00\x00\xe2\x03\x00'\
|
||||
b'\x80\x0f\x00\x02\x3e\x00\x02\x06\x00\xce\x01\x00\x3e\x00\x00\xf2'\
|
||||
b'\x01\x00\xc2\x07\x00\x00\x3f\x00\x00\x1c\x00\x80\x03\x00\x62\x00'\
|
||||
b'\x00\x1e\x00\x00\x06\x00\x00\x02\x00\x00\x0e\x00\x02\x20\x00\x02'\
|
||||
b'\x20\x00\x06\x30\x00\x0e\x28\x00\x1e\x26\x00\x72\x03\x00\xe0\x01'\
|
||||
b'\x00\xc0\x01\x00\xa0\x27\x00\x12\x2e\x00\x0a\x3c\x00\x06\x38\x00'\
|
||||
b'\x02\x30\x00\x02\x20\x00\x0e\x00\x02\x00\x00\x06\x00\x00\x0e\x00'\
|
||||
b'\x00\x1e\x00\x00\x3a\x20\x00\xf2\x20\x00\xc0\x3f\x00\x80\x3f\x00'\
|
||||
b'\x40\x20\x00\x22\x20\x00\x1a\x00\x00\x06\x00\x00\x02\x00\x00\x02'\
|
||||
b'\x00\x00\x0c\x00\x00\x20\x00\x0c\x30\x00\x06\x3c\x00\x02\x3e\x00'\
|
||||
b'\x02\x2f\x00\xc2\x23\x00\xe2\x20\x00\x72\x20\x00\x1e\x20\x00\x0e'\
|
||||
b'\x20\x00\x02\x30\x00\x00\x0c\x00\x07\x00\xfe\xff\x01\xfe\xff\x01'\
|
||||
b'\x02\x00\x01\x02\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06'\
|
||||
b'\x00\x03\x00\x00\x1e\x00\x00\xf0\x00\x00\x80\x07\x00\x00\x3c\x00'\
|
||||
b'\x00\x20\x00\x07\x00\x02\x00\x01\x02\x00\x01\xfe\xff\x01\xfe\xff'\
|
||||
b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\xc0'\
|
||||
b'\x00\x00\x70\x00\x00\x1c\x00\x00\x06\x00\x00\x0e\x00\x00\x38\x00'\
|
||||
b'\x00\xe0\x00\x00\x80\x00\x00\x0a\x00\x00\x40\x00\x00\x40\x00\x00'\
|
||||
b'\x40\x00\x00\x40\x00\x00\x40\x00\x00\x40\x00\x00\x40\x00\x00\x40'\
|
||||
b'\x00\x00\x40\x00\x00\x40\x00\x05\x00\x02\x00\x00\x04\x00\x00\x08'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\xc0\x18\x00\xe0\x3c\x00'\
|
||||
b'\x20\x22\x00\x20\x22\x00\xe0\x3f\x00\xc0\x3f\x00\x00\x20\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x0a\x00\x02\x00\x00\xfe\x1f\x00\xff\x3f\x00'\
|
||||
b'\x40\x20\x00\x20\x20\x00\x20\x20\x00\x60\x10\x00\xc0\x1f\x00\x80'\
|
||||
b'\x07\x00\x00\x00\x00\x09\x00\x00\x0f\x00\xc0\x1f\x00\x60\x30\x00'\
|
||||
b'\x20\x20\x00\x20\x20\x00\x60\x20\x00\x40\x10\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x0a\x00\x00\x0f\x00\xc0\x1f\x00\x60\x30\x00\x20\x20\x00'\
|
||||
b'\x20\x20\x00\x42\x20\x00\xfe\x3f\x00\xff\x3f\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x09\x00\x80\x0f\x00\xc0\x1f\x00\xc0\x38\x00\xa0\x30\x00'\
|
||||
b'\xa0\x20\x00\xa0\x20\x00\xe0\x20\x00\xc0\x18\x00\x00\x00\x00\x08'\
|
||||
b'\x00\x00\x20\x00\x20\x20\x00\xfc\x3f\x00\xfe\x3f\x00\x21\x20\x00'\
|
||||
b'\x21\x00\x00\x03\x00\x00\x03\x00\x00\x0a\x00\x00\x80\x03\x80\xf3'\
|
||||
b'\x07\xc0\x2b\x06\x20\x26\x04\x20\x24\x04\x60\x24\x04\xc0\x27\x04'\
|
||||
b'\xc0\x23\x02\x40\xc0\x01\x40\x00\x00\x0a\x00\x02\x20\x00\xfe\x3f'\
|
||||
b'\x00\xff\x3f\x00\x40\x20\x00\x20\x00\x00\x20\x00\x00\x20\x20\x00'\
|
||||
b'\xe0\x3f\x00\xc0\x3f\x00\x00\x20\x00\x06\x00\x00\x20\x00\x40\x20'\
|
||||
b'\x00\xc3\x3f\x00\xe3\x3f\x00\x00\x20\x00\x00\x00\x00\x07\x00\x00'\
|
||||
b'\x00\x04\x00\x00\x04\x00\x00\x04\x40\x00\x04\xe3\xff\x03\xe3\xff'\
|
||||
b'\x01\x00\x00\x00\x0a\x00\x02\x20\x00\xfe\x3f\x00\xff\x3f\x00\x00'\
|
||||
b'\x23\x00\x00\x07\x00\xa0\x2c\x00\x60\x38\x00\x20\x30\x00\x20\x20'\
|
||||
b'\x00\x00\x20\x00\x05\x00\x00\x20\x00\x02\x20\x00\xfe\x3f\x00\xff'\
|
||||
b'\x3f\x00\x00\x20\x00\x10\x00\x20\x20\x00\xe0\x3f\x00\xe0\x3f\x00'\
|
||||
b'\x40\x20\x00\x20\x00\x00\x20\x20\x00\xe0\x3f\x00\xc0\x3f\x00\x40'\
|
||||
b'\x20\x00\x20\x00\x00\x20\x20\x00\xe0\x3f\x00\xc0\x3f\x00\x00\x20'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x20\x20\x00\xe0\x3f\x00\xe0'\
|
||||
b'\x3f\x00\x40\x20\x00\x20\x00\x00\x20\x00\x00\x20\x20\x00\xe0\x3f'\
|
||||
b'\x00\xc0\x3f\x00\x00\x20\x00\x0a\x00\x80\x0f\x00\xc0\x1f\x00\x60'\
|
||||
b'\x38\x00\x20\x20\x00\x20\x20\x00\x20\x20\x00\xe0\x30\x00\xc0\x1f'\
|
||||
b'\x00\x80\x0f\x00\x00\x00\x00\x0a\x00\x20\x00\x04\xe0\xff\x07\xe0'\
|
||||
b'\xff\x07\x40\x20\x04\x20\x20\x00\x20\x20\x00\x60\x30\x00\xc0\x1f'\
|
||||
b'\x00\x80\x07\x00\x00\x00\x00\x0a\x00\x00\x0f\x00\xc0\x1f\x00\x60'\
|
||||
b'\x30\x00\x20\x20\x00\x20\x20\x00\x20\x20\x04\xc0\xff\x07\xe0\xff'\
|
||||
b'\x07\x00\x00\x04\x00\x00\x00\x07\x00\x00\x20\x00\xe0\x3f\x00\xe0'\
|
||||
b'\x3f\x00\x40\x20\x00\x20\x00\x00\x20\x00\x00\x00\x00\x00\x07\x00'\
|
||||
b'\xc0\x39\x00\x20\x13\x00\x20\x22\x00\x20\x26\x00\x40\x3e\x00\xe0'\
|
||||
b'\x1c\x00\x00\x00\x00\x06\x00\x20\x00\x00\xf0\x1f\x00\xf8\x3f\x00'\
|
||||
b'\x20\x20\x00\x00\x20\x00\x00\x00\x00\x0a\x00\x20\x00\x00\xe0\x1f'\
|
||||
b'\x00\xe0\x3f\x00\x00\x20\x00\x00\x20\x00\x00\x20\x00\x20\x10\x00'\
|
||||
b'\xe0\x3f\x00\xe0\x3f\x00\x00\x20\x00\x09\x00\x20\x00\x00\x60\x00'\
|
||||
b'\x00\xe0\x01\x00\x20\x07\x00\x00\x3c\x00\x00\x18\x00\x20\x07\x00'\
|
||||
b'\xe0\x00\x00\x20\x00\x00\x0e\x00\x20\x00\x00\xe0\x00\x00\xe0\x03'\
|
||||
b'\x00\x20\x0e\x00\x00\x38\x00\x20\x0c\x00\xe0\x02\x00\xe0\x03\x00'\
|
||||
b'\x20\x0e\x00\x00\x38\x00\x00\x0c\x00\xa0\x03\x00\x60\x00\x00\x20'\
|
||||
b'\x00\x00\x0a\x00\x20\x20\x00\x20\x30\x00\xe0\x28\x00\xe0\x05\x00'\
|
||||
b'\x00\x03\x00\xa0\x2e\x00\x60\x3c\x00\x20\x30\x00\x20\x20\x00\x00'\
|
||||
b'\x00\x00\x09\x00\x20\x00\x00\xe0\x00\x06\xe0\x03\x04\x20\x0f\x06'\
|
||||
b'\x00\xbc\x01\x00\x70\x00\x00\x0e\x00\xa0\x01\x00\x60\x00\x00\x08'\
|
||||
b'\x00\x60\x30\x00\x20\x38\x00\x20\x2c\x00\x20\x27\x00\xa0\x21\x00'\
|
||||
b'\xe0\x20\x00\x60\x30\x00\x00\x18\x00\x0a\x00\x00\x00\x00\x00\x03'\
|
||||
b'\x00\xfe\xff\x01\xff\xfc\x03\x01\x00\x02\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\xff\x3f\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x01\x00\x02\xff\xfc\x03\xfe'\
|
||||
b'\xff\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x03\x00\x00'\
|
||||
b'\x01\x00\x00\x01\x00\x00\x01\x00\x00\x02\x00\x00\x02\x00\x00\x02'\
|
||||
b'\x00\x00\x03\x00\x00\x00\x00'
|
||||
|
||||
_index =\
|
||||
b'\x00\x00\x11\x00\x28\x00\x42\x00\x62\x00\x82\x00\xb7\x00\xe9\x00'\
|
||||
b'\xf7\x00\x0e\x01\x25\x01\x45\x01\x68\x01\x79\x01\x90\x01\xa1\x01'\
|
||||
b'\xb5\x01\xd5\x01\xf5\x01\x15\x02\x35\x02\x55\x02\x75\x02\x95\x02'\
|
||||
b'\xb5\x02\xd5\x02\xf5\x02\x06\x03\x17\x03\x3a\x03\x5d\x03\x80\x03'\
|
||||
b'\x9d\x03\xd2\x03\xfe\x03\x27\x04\x50\x04\x7c\x04\xa2\x04\xc5\x04'\
|
||||
b'\xf1\x04\x1d\x05\x34\x05\x4e\x05\x7a\x05\xa0\x05\xd8\x05\x07\x06'\
|
||||
b'\x33\x06\x59\x06\x85\x06\xae\x06\xd1\x06\xf7\x06\x23\x07\x4f\x07'\
|
||||
b'\x8a\x07\xb6\x07\xe2\x07\x08\x08\x1f\x08\x33\x08\x4a\x08\x67\x08'\
|
||||
b'\x87\x08\x98\x08\xb5\x08\xd5\x08\xf2\x08\x12\x09\x2f\x09\x49\x09'\
|
||||
b'\x69\x09\x89\x09\x9d\x09\xb4\x09\xd4\x09\xe5\x09\x17\x0a\x37\x0a'\
|
||||
b'\x57\x0a\x77\x0a\x97\x0a\xae\x0a\xc5\x0a\xd9\x0a\xf9\x0a\x16\x0b'\
|
||||
b'\x42\x0b\x62\x0b\x7f\x0b\x99\x0b\xb9\x0b\xc7\x0b\xe7\x0b\x07\x0c'\
|
||||
|
||||
|
||||
|
||||
def _chr_addr(ordch):
|
||||
offset = 2 * (ordch - 32)
|
||||
return int.from_bytes(_index[offset:offset + 2], 'little')
|
||||
|
||||
def get_ch(ch):
|
||||
ordch = ord(ch)
|
||||
ordch = ordch if ordch >= 32 and ordch <= 126 else ord('?')
|
||||
offset = _chr_addr(ordch)
|
||||
width = int.from_bytes(_font[offset:offset + 2], 'little')
|
||||
next_offs = _chr_addr(ordch +1)
|
||||
return memoryview(_font[offset + 2:next_offs]), 19, width
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
# Code generated by font-to-py.py.
|
||||
# Font: Inconsolata.otf
|
||||
version = '0.1'
|
||||
|
||||
def height():
|
||||
return 14
|
||||
|
||||
def max_width():
|
||||
return 8
|
||||
|
||||
def hmap():
|
||||
return False
|
||||
|
||||
def reverse():
|
||||
return False
|
||||
|
||||
def monospaced():
|
||||
return True
|
||||
|
||||
_font =\
|
||||
b'\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x08\x00\xff\x06\x3f\x06\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x0f\x00\x02\x00\x00\x00\x0f\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x08\x00\x90\x00\x90\x04\xfc\x07\x8e\x00'\
|
||||
b'\x88\x07\xfe\x03\x8a\x00\x08\x00\x08\x00\x18\x03\x34\x06\x26\x04'\
|
||||
b'\xff\x0f\x46\x06\xcc\x03\x00\x00\x00\x00\x08\x00\x0c\x00\x1e\x06'\
|
||||
b'\x92\x03\xce\x00\x30\x03\x8c\x04\x86\x04\x00\x03\x08\x00\x00\x01'\
|
||||
b'\xcc\x07\x7e\x04\x62\x04\xd2\x04\x8c\x03\xc0\x07\x80\x04\x08\x00'\
|
||||
b'\x08\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x08\x00\xf0\x01\xbc\x07\x06\x0c\x02\x10\x01\x30\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x03\x30\x02\x10\x06\x0c\x38\x07\xf0\x01\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x00\x00\x30\x01\xa0\x01\x7c\x00\xfc\x00'\
|
||||
b'\xa0\x01\x30\x01\x00\x00\x08\x00\x20\x00\x20\x00\xfc\x01\xfc\x01'\
|
||||
b'\x20\x00\x20\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x16\x00\x0e'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x20\x00\x20\x00'\
|
||||
b'\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00\x00\x00\x08\x00\x00\x06'\
|
||||
b'\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00'\
|
||||
b'\x00\x04\x00\x07\xe0\x01\x38\x00\x0e\x00\x03\x00\x00\x00\x00\x00'\
|
||||
b'\x08\x00\xf8\x01\x86\x07\xc2\x04\x32\x04\x1e\x06\xf8\x03\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x04\x00\x04\x00\x02\x00\xfe\x07\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x04\x06\x06\x07\x82\x05\xc2\x04\x66\x04'\
|
||||
b'\x1c\x04\x00\x00\x00\x00\x08\x00\x00\x02\x02\x04\x22\x04\x22\x04'\
|
||||
b'\x5e\x06\x8c\x03\x00\x00\x00\x00\x08\x00\xc0\x00\xb0\x00\x98\x00'\
|
||||
b'\x86\x00\xfe\x07\x80\x00\x00\x00\x00\x00\x08\x00\x3c\x02\x3e\x06'\
|
||||
b'\x32\x04\x32\x04\x22\x06\xe2\x03\x00\x00\x00\x00\x08\x00\xf8\x01'\
|
||||
b'\x6c\x07\x32\x04\x32\x04\x22\x06\xc2\x03\x00\x00\x00\x00\x08\x00'\
|
||||
b'\x02\x00\x02\x06\x82\x07\xf2\x00\x1e\x00\x06\x00\x00\x00\x00\x00'\
|
||||
b'\x08\x00\x8c\x03\x5e\x06\x22\x04\x22\x04\x5e\x06\xcc\x03\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x3c\x00\x66\x04\x42\x04\x42\x04\x66\x03\xfc\x01'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x30\x06\x30\x06\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x30\x16\x30\x0e\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x20\x00\x60\x00\x70\x00'\
|
||||
b'\x90\x00\x98\x01\x08\x01\x0c\x03\x00\x02\x08\x00\x90\x00\x90\x00'\
|
||||
b'\x90\x00\x90\x00\x90\x00\x90\x00\x00\x00\x00\x00\x08\x00\x00\x02'\
|
||||
b'\x0c\x03\x08\x01\x98\x01\x90\x00\x70\x00\x60\x00\x20\x00\x08\x00'\
|
||||
b'\x06\x00\x03\x00\x81\x06\xe1\x06\x3f\x00\x1e\x00\x00\x00\x00\x00'\
|
||||
b'\x08\x00\x70\x00\xfc\x03\x06\x06\xf2\x04\x92\x04\x92\x04\xfc\x06'\
|
||||
b'\xf8\x00\x08\x00\x00\x04\x80\x07\xf0\x00\x9e\x00\xbc\x00\xe0\x00'\
|
||||
b'\x80\x07\x00\x04\x08\x00\xfe\x07\x22\x04\x22\x04\x22\x04\x76\x06'\
|
||||
b'\xdc\x03\x00\x00\x00\x00\x08\x00\xfc\x03\x06\x06\x02\x04\x02\x04'\
|
||||
b'\x02\x04\x06\x02\x00\x00\x00\x00\x08\x00\xfe\x07\x02\x04\x02\x04'\
|
||||
b'\x02\x04\x06\x02\xfc\x01\x00\x00\x00\x00\x08\x00\xfe\x07\x22\x04'\
|
||||
b'\x22\x04\x22\x04\x22\x04\x02\x04\x00\x00\x00\x00\x08\x00\xfe\x07'\
|
||||
b'\xfe\x07\x22\x00\x22\x00\x22\x00\x02\x00\x00\x00\x00\x00\x08\x00'\
|
||||
b'\x60\x00\xfc\x03\x06\x06\x02\x04\x42\x04\x42\x04\xc6\x07\xc0\x03'\
|
||||
b'\x08\x00\xfe\x07\x20\x00\x20\x00\x20\x00\x20\x00\xfe\x07\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x02\x04\x02\x04\xfe\x07\xfe\x07\x02\x04\x00\x04'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x00\x06\x00\x04\x02\x04\x02\x06\xfe\x03'\
|
||||
b'\x02\x00\x00\x00\x00\x00\x08\x00\xfe\x07\x20\x00\x78\x00\xcc\x01'\
|
||||
b'\x06\x03\x02\x06\x00\x00\x00\x00\x08\x00\xfe\x07\x00\x04\x00\x04'\
|
||||
b'\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x08\x00\xfe\x07\x18\x00'\
|
||||
b'\x60\x00\x60\x00\x18\x00\xfe\x07\xfe\x07\x00\x00\x08\x00\xfe\x07'\
|
||||
b'\x0c\x00\x30\x00\xe0\x00\x80\x03\xfe\x07\x00\x00\x00\x00\x08\x00'\
|
||||
b'\xf0\x00\xfc\x03\x06\x06\x02\x04\x02\x04\x06\x06\xfc\x03\xf0\x00'\
|
||||
b'\x08\x00\xfe\x07\x62\x00\x62\x00\x62\x00\x26\x00\x3c\x00\x00\x00'\
|
||||
b'\x00\x00\x08\x00\xf0\x00\xfc\x03\x06\x06\x02\x0c\x02\x1c\x06\x16'\
|
||||
b'\xfc\x13\xf0\x00\x08\x00\xfe\x07\x62\x00\x62\x00\xe2\x00\xa6\x03'\
|
||||
b'\x3c\x06\x00\x00\x00\x00\x08\x00\x1c\x02\x36\x04\x22\x04\x62\x04'\
|
||||
b'\x42\x06\xc4\x03\x00\x00\x00\x00\x08\x00\x02\x00\x02\x00\x02\x00'\
|
||||
b'\xfe\x07\xfe\x07\x02\x00\x02\x00\x02\x00\x08\x00\xfe\x03\x00\x06'\
|
||||
b'\x00\x04\x00\x04\x00\x06\xfe\x03\x00\x00\x00\x00\x08\x00\x02\x00'\
|
||||
b'\x1e\x00\xf8\x00\xc0\x07\x80\x07\xf0\x00\x1e\x00\x02\x00\x08\x00'\
|
||||
b'\x06\x00\xfe\x03\x80\x07\x78\x00\x7c\x00\xc0\x07\xf8\x03\x0e\x00'\
|
||||
b'\x08\x00\x00\x00\x06\x06\x8c\x03\xf0\x00\xf0\x00\x8c\x03\x02\x06'\
|
||||
b'\x00\x00\x08\x00\x02\x00\x06\x00\x1c\x00\xf0\x07\xe0\x07\x38\x00'\
|
||||
b'\x06\x00\x00\x00\x08\x00\x02\x06\x82\x07\xe2\x04\x32\x04\x1e\x04'\
|
||||
b'\x06\x04\x00\x04\x00\x00\x08\x00\xff\x0f\x01\x08\x01\x08\x01\x08'\
|
||||
b'\x01\x08\x00\x00\x00\x00\x00\x00\x08\x00\x03\x00\x0e\x00\x38\x00'\
|
||||
b'\xe0\x01\x00\x07\x00\x04\x00\x00\x00\x00\x08\x00\x01\x08\x01\x08'\
|
||||
b'\x01\x08\x01\x08\xff\x0f\x00\x00\x00\x00\x00\x00\x08\x00\x20\x00'\
|
||||
b'\x18\x00\x0e\x00\x0e\x00\x18\x00\x00\x00\x00\x00\x00\x00\x08\x00'\
|
||||
b'\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08'\
|
||||
b'\x08\x00\x03\x00\x0e\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x90\x07\x90\x04\x98\x04\xd8\x04\xd0\x06\xf0\x07'\
|
||||
b'\x00\x00\x00\x00\x08\x00\xff\x07\x10\x06\x18\x04\x18\x04\x10\x06'\
|
||||
b'\xf0\x03\x00\x00\x00\x00\x08\x00\xe0\x03\x30\x06\x18\x04\x18\x04'\
|
||||
b'\x18\x04\x30\x06\x00\x00\x00\x00\x08\x00\xf0\x03\x10\x06\x08\x04'\
|
||||
b'\x18\x04\x30\x02\xff\x07\x00\x00\x00\x00\x08\x00\xe0\x03\xd0\x06'\
|
||||
b'\xc8\x04\xc8\x04\xd0\x04\xf0\x02\x00\x00\x00\x00\x08\x00\x10\x00'\
|
||||
b'\xfc\x07\xfe\x07\x11\x00\x11\x00\x03\x00\x02\x00\x00\x00\x08\x00'\
|
||||
b'\x00\x00\xf0\x1f\x98\x37\x88\x27\x98\x26\xf0\x34\x08\x1c\x08\x00'\
|
||||
b'\x08\x00\xff\x07\x30\x00\x10\x00\x18\x00\x18\x00\xf0\x07\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x00\x04\x18\x04\xfb\x07\xfb\x07\x00\x04\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x08\x00\x00\x18\x18\x30\x18\x20\x1a\x18\xfb\x1f'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x08\x00\xff\x07\x80\x00\xc0\x00\xa0\x01'\
|
||||
b'\x10\x03\x08\x06\x00\x00\x00\x00\x08\x00\x01\x04\x01\x04\xff\x07'\
|
||||
b'\xff\x07\x00\x04\x00\x04\x00\x00\x00\x00\x08\x00\xf8\x07\xf8\x07'\
|
||||
b'\x08\x00\xf8\x07\xf0\x07\x08\x00\xf8\x07\xf0\x07\x08\x00\xf8\x07'\
|
||||
b'\x30\x00\x10\x00\x18\x00\x18\x00\xf0\x07\x00\x00\x00\x00\x08\x00'\
|
||||
b'\xe0\x03\x10\x06\x18\x04\x18\x04\x10\x06\xf0\x03\x00\x00\x00\x00'\
|
||||
b'\x08\x00\xf8\x3f\x10\x06\x18\x04\x18\x04\x10\x06\xf0\x03\x80\x00'\
|
||||
b'\x00\x00\x08\x00\xf0\x03\x10\x06\x08\x04\x18\x04\x10\x02\xf8\x3f'\
|
||||
b'\x00\x00\x00\x00\x08\x00\xf8\x07\xf8\x07\x10\x00\x18\x00\x18\x00'\
|
||||
b'\x10\x00\x00\x00\x00\x00\x08\x00\x20\x02\x70\x04\xc8\x04\xc8\x04'\
|
||||
b'\x98\x04\x90\x03\x00\x00\x00\x00\x08\x00\x18\x00\x18\x00\xfe\x07'\
|
||||
b'\x18\x04\x18\x04\x18\x06\x00\x00\x00\x00\x08\x00\xf8\x03\x00\x06'\
|
||||
b'\x00\x04\x00\x04\x00\x02\xf8\x07\x00\x00\x00\x00\x08\x00\x08\x00'\
|
||||
b'\x38\x00\xe0\x01\x80\x07\x00\x07\xc0\x01\x38\x00\x00\x00\x08\x00'\
|
||||
b'\x38\x00\xf8\x03\x00\x06\xf0\x01\xf0\x00\x80\x07\xf8\x07\x38\x00'\
|
||||
b'\x08\x00\x18\x04\x30\x03\xe0\x01\xe0\x01\x30\x03\x18\x04\x00\x00'\
|
||||
b'\x00\x00\x08\x00\x00\x10\x38\x20\xe0\x30\x80\x1f\x00\x0f\xc0\x01'\
|
||||
b'\x78\x00\x08\x00\x08\x00\x18\x06\x18\x07\x98\x05\x78\x04\x38\x04'\
|
||||
b'\x18\x04\x00\x00\x00\x00\x08\x00\x40\x00\xf8\x0f\x3e\x1f\x02\x10'\
|
||||
b'\x02\x30\x02\x30\x00\x00\x00\x00\x08\x00\xff\x1f\xff\x1f\x00\x00'\
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x02\x30\x02\x30'\
|
||||
b'\x02\x10\x3e\x1f\xf8\x0f\x40\x00\x00\x00\x00\x00\x08\x00\x00\x00'\
|
||||
b'\x30\x00\x18\x00\x18\x00\x30\x00\x20\x00\x10\x00\x10\x00'
|
||||
|
||||
_index =\
|
||||
b'\x00\x00\x12\x00\x24\x00\x36\x00\x48\x00\x5a\x00\x6c\x00\x7e\x00'\
|
||||
b'\x90\x00\xa2\x00\xb4\x00\xc6\x00\xd8\x00\xea\x00\xfc\x00\x0e\x01'\
|
||||
b'\x20\x01\x32\x01\x44\x01\x56\x01\x68\x01\x7a\x01\x8c\x01\x9e\x01'\
|
||||
b'\xb0\x01\xc2\x01\xd4\x01\xe6\x01\xf8\x01\x0a\x02\x1c\x02\x2e\x02'\
|
||||
b'\x40\x02\x52\x02\x64\x02\x76\x02\x88\x02\x9a\x02\xac\x02\xbe\x02'\
|
||||
b'\xd0\x02\xe2\x02\xf4\x02\x06\x03\x18\x03\x2a\x03\x3c\x03\x4e\x03'\
|
||||
b'\x60\x03\x72\x03\x84\x03\x96\x03\xa8\x03\xba\x03\xcc\x03\xde\x03'\
|
||||
b'\xf0\x03\x02\x04\x14\x04\x26\x04\x38\x04\x4a\x04\x5c\x04\x6e\x04'\
|
||||
b'\x80\x04\x92\x04\xa4\x04\xb6\x04\xc8\x04\xda\x04\xec\x04\xfe\x04'\
|
||||
b'\x10\x05\x22\x05\x34\x05\x46\x05\x58\x05\x6a\x05\x7c\x05\x8e\x05'\
|
||||
b'\xa0\x05\xb2\x05\xc4\x05\xd6\x05\xe8\x05\xfa\x05\x0c\x06\x1e\x06'\
|
||||
b'\x30\x06\x42\x06\x54\x06\x66\x06\x78\x06\x8a\x06\x9c\x06\xae\x06'\
|
||||
|
||||
|
||||
|
||||
def _chr_addr(ordch):
|
||||
offset = 2 * (ordch - 32)
|
||||
return int.from_bytes(_index[offset:offset + 2], 'little')
|
||||
|
||||
def get_ch(ch):
|
||||
ordch = ord(ch)
|
||||
ordch = ordch if ordch >= 32 and ordch <= 126 else ord('?')
|
||||
offset = _chr_addr(ordch)
|
||||
width = int.from_bytes(_font[offset:offset + 2], 'little')
|
||||
next_offs = _chr_addr(ordch +1)
|
||||
return memoryview(_font[offset + 2:next_offs]), 14, width
|
||||
|
|
@ -68,7 +68,7 @@ else: # I2C
|
|||
ssd = SSD1306_I2C(WIDTH, HEIGHT, i2c)
|
||||
|
||||
#wri = Writer(ssd, freeserif19)
|
||||
wri2 = Writer(ssd, freesans20)
|
||||
wri2 = Writer(ssd, freesans20, verbose=False)
|
||||
Writer.set_clip(True, True)
|
||||
#Writer.set_textpos(20, 20)
|
||||
#wri2.printstring('Tues')
|
||||
|
|
|
@ -45,16 +45,17 @@ class Writer(object):
|
|||
cls.row_clip = row_clip
|
||||
cls.col_clip = col_clip
|
||||
|
||||
def __init__(self, device, font):
|
||||
def __init__(self, device, font, verbose=True):
|
||||
super().__init__()
|
||||
self.device = device
|
||||
self.font = font
|
||||
# Allow to work with any font mapping
|
||||
if font.hmap():
|
||||
self.map = framebuf.MHMSB if font.reverse() else framebuf.MHLSB
|
||||
self.map = framebuf.MONO_HMSB if font.reverse() else framebuf.MONO_HLSB
|
||||
else:
|
||||
raise ValueError('Font must be horizontally mapped.')
|
||||
print('Orientation: {} Reversal: {}'.format('horiz' if font.hmap() else 'vert', font.reverse()))
|
||||
if verbose:
|
||||
print('Orientation: {} Reversal: {}'.format('horiz' if font.hmap() else 'vert', font.reverse()))
|
||||
self.screenwidth = device.width # In pixels
|
||||
self.screenheight = device.height
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue