Allow for 256 chars
This commit is contained in:
parent
9df4f752f1
commit
15abeb8674
|
@ -7,10 +7,10 @@ font = "font.png"
|
|||
|
||||
im = imageio.imread(font)
|
||||
|
||||
for c in asci:
|
||||
for i in range(256):
|
||||
|
||||
base_x = (ord(c) % 16) * 16
|
||||
base_y = math.floor(ord(c)/16) * 16
|
||||
base_x = (i % 16) * 16
|
||||
base_y = math.floor(i/16) * 16
|
||||
|
||||
n = 0
|
||||
for y in range(16):
|
||||
|
@ -24,4 +24,7 @@ for c in asci:
|
|||
|
||||
n = n + k
|
||||
|
||||
print("assign char_data[{:2}] = 256'h{:064x}; // {}".format(ord(c)-32, n, c))
|
||||
if i >= 0x20 and i < 0x7F:
|
||||
print("assign char_data[{:3}] = 256'h{:064x}; // {}".format(i, n, chr(i)))
|
||||
else:
|
||||
print("assign char_data[{:3}] = 256'h{:064x};".format(i, n))
|
||||
|
|
Loading…
Reference in New Issue
Block a user