From fd356b5aa8b0b6b0cfb53c3d32ff3115898fe573 Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Sun, 3 Mar 2024 19:16:11 +0100 Subject: [PATCH] Show glyph name under preview --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f8453ad..6415694 100644 --- a/main.py +++ b/main.py @@ -89,8 +89,11 @@ def number_only_validate(val): def update_glyph_preview(): global canvas_editor global canvas_preview + global label_glyph_name canvas_preview.delete("all") canvas_preview.create_text((50,100),text=chr(canvas_editor.current_char),fill="white",font="tkDefaultFont 70") + name=unicodedata.name(chr(canvas_editor.current_char),"unknown") + label_glyph_name.config(text=f"{name} U+{canvas_editor.current_char:04x}") window=tkinter.Tk() @@ -113,7 +116,7 @@ frame_controls.pack(side="right") canvas_preview=tkinter.Canvas(frame_controls,width=100,height=200,bg="black") canvas_preview.pack(side="top") -label_glyph_name=tkinter.Label(frame_controls,text="Placeholder") +label_glyph_name=tkinter.Label(frame_controls) label_glyph_name.pack(side="top") frame_nav=tkinter.Frame(frame_controls)