From da382f5fab80c421c9029f28486e7b2eea526ee3 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sun, 18 May 2025 13:40:05 +0200 Subject: [PATCH] add glyph_to_name --- common/Font.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/Font.py b/common/Font.py index f01c91b..5dfbd0d 100644 --- a/common/Font.py +++ b/common/Font.py @@ -77,6 +77,13 @@ def name_to_glyph(name): return None +def glyph_to_name(glyph_id): + for k in name_to_glyph_d: + if glyph_id == name_to_glyph_d[k]: + return k + return glyph_id + + def is_space(character): for name in space_d: if character == space_d[name][0]: