Adjust project exporting

This commit is contained in:
2024-03-04 21:01:14 +01:00
parent d6558a77dd
commit 5bddf37c05
3 changed files with 101 additions and 12 deletions

View File

@@ -90,17 +90,9 @@ class EditorCanvas(tkinter.Canvas):
self.current_char_pixels[x]=0
self.draw()
return
base64_data=self.project.chars[chr(self.current_char)]
pixels=base64.b64decode(base64_data.encode("ascii"))
pixel_index=0
for pixel in pixels:
if pixel_index>=len(self.current_char_pixels):
break
for x in range(8):
if pixel_index>=len(self.current_char_pixels):
break
self.current_char_pixels[pixel_index]=(pixel>>(7-x))&1
pixel_index+=1
pixels=self.project.decode_char(chr(self.current_char))
for x in range(len(pixels)):
self.current_char_pixels[x]=pixels[x]
self.draw()