Show glyph preview

This commit is contained in:
mrkubax10 2024-03-03 17:55:29 +01:00
parent 6a7cfd0d65
commit 5ef7a7fcc0

13
main.py
View File

@ -43,6 +43,7 @@ def menu_file_open_project_click():
finally:
canvas_editor.after_project_load()
canvas_editor.draw()
update_glyph_preview()
def menu_file_save_project_click():
@ -71,17 +72,27 @@ def menu_file_save_project_as_click():
pass
def button_prev_glyph_click():
global canvas_editor
canvas_editor.prev_glyph()
update_glyph_preview()
def button_next_glyph_click():
global canvas_editor
canvas_editor.next_glyph()
update_glyph_preview()
def number_only_validate(val):
return str.isdigit(val) or val==""
def update_glyph_preview():
global canvas_editor
global canvas_preview
canvas_preview.delete("all")
canvas_preview.create_text((50,100),text=chr(canvas_editor.current_char),fill="white",font="tkDefaultFont 70")
window=tkinter.Tk()
window.title("fonteditor")
window.geometry(f"{WINDOW_SIZE[0]}x{WINDOW_SIZE[1]}")