kopia lustrzana https://github.com/peterhinch/micropython-font-to-py
Fix code comment error
rodzic
ba0b85d22f
commit
7fa84269fd
|
@ -165,7 +165,7 @@ b'\x1b\x01\x35\x01\x4f\x01\x75\x01\x9e\x01\xb2\x01\xcc\x01\xe0\x01'\
|
||||||
def get_ch(ch):
|
def get_ch(ch):
|
||||||
# validate ch, if out of range use '?'
|
# validate ch, if out of range use '?'
|
||||||
# get offsets into _font and retrieve char width
|
# get offsets into _font and retrieve char width
|
||||||
# Return: address of start of bitmap, height and width
|
# Return: memoryview of bitmap, height and width
|
||||||
return memoryview(_font[offset + 2, next_offset]), height, width
|
return memoryview(_font[offset + 2, next_offset]), height, width
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -187,8 +187,8 @@ space.
|
||||||
A character occupies a space where (0, 0) represents the coordinates of the top
|
A character occupies a space where (0, 0) represents the coordinates of the top
|
||||||
left hand corner of the bitmap. It comprises a set of pixels where increasing x
|
left hand corner of the bitmap. It comprises a set of pixels where increasing x
|
||||||
values represent locations to the right of the origin and increasing y values
|
values represent locations to the right of the origin and increasing y values
|
||||||
represent downward positions. Mapping is the process whereby this two
|
represent downward positions. Mapping defines the relationship between this
|
||||||
dimensional array of bits is transformed into a linear sequence of bytes.
|
abstract two dimensional array of bits and the physical linear sequence of bytes.
|
||||||
|
|
||||||
Vertical mapping means that the LSB of first byte is pixel (0,0), MSB of first
|
Vertical mapping means that the LSB of first byte is pixel (0,0), MSB of first
|
||||||
byte is (0, 7). The second byte (assuming the height is greater than 8 pixels)
|
byte is (0, 7). The second byte (assuming the height is greater than 8 pixels)
|
||||||
|
|
Ładowanie…
Reference in New Issue