Show glyph preview
This commit is contained in:
parent
6a7cfd0d65
commit
5ef7a7fcc0
13
main.py
13
main.py
@ -43,6 +43,7 @@ def menu_file_open_project_click():
|
|||||||
finally:
|
finally:
|
||||||
canvas_editor.after_project_load()
|
canvas_editor.after_project_load()
|
||||||
canvas_editor.draw()
|
canvas_editor.draw()
|
||||||
|
update_glyph_preview()
|
||||||
|
|
||||||
|
|
||||||
def menu_file_save_project_click():
|
def menu_file_save_project_click():
|
||||||
@ -71,17 +72,27 @@ def menu_file_save_project_as_click():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def button_prev_glyph_click():
|
def button_prev_glyph_click():
|
||||||
|
global canvas_editor
|
||||||
canvas_editor.prev_glyph()
|
canvas_editor.prev_glyph()
|
||||||
|
update_glyph_preview()
|
||||||
|
|
||||||
def button_next_glyph_click():
|
def button_next_glyph_click():
|
||||||
|
global canvas_editor
|
||||||
canvas_editor.next_glyph()
|
canvas_editor.next_glyph()
|
||||||
|
update_glyph_preview()
|
||||||
|
|
||||||
|
|
||||||
def number_only_validate(val):
|
def number_only_validate(val):
|
||||||
return str.isdigit(val) or 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=tkinter.Tk()
|
||||||
window.title("fonteditor")
|
window.title("fonteditor")
|
||||||
window.geometry(f"{WINDOW_SIZE[0]}x{WINDOW_SIZE[1]}")
|
window.geometry(f"{WINDOW_SIZE[0]}x{WINDOW_SIZE[1]}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user