Browse Source

Bmp fonts updated

master
n42 1 year ago
parent
commit
427f0f0cc1
No known key found for this signature in database GPG Key ID: 426937063BE52D19
  1. BIN
      resources/bmp/charmap.bmp
  2. 18
      resources/bmp/font_converter.py

BIN
resources/bmp/charmap.bmp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

18
resources/bmp/font_converter.py

@ -0,0 +1,18 @@
from PIL import Image
import numpy as np
img = np.array(Image.open('charmap.bmp'))
i: int # col
j: int # line
ascii: int = 0
chars = [] # chars tab
for i in range(0,256,16):
for j in range(0,192,12):
chars.append(img[i:i+16,j:j+12,:])
chars_arr = np.concatenate(chars, axis=0)
Image.fromarray(chars_arr).save("new.bmp")
Loading…
Cancel
Save