From 65710b05ee8601f2edea554e6d2cdc20c464499a Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Wed, 28 Aug 2024 18:07:17 +0200 Subject: [PATCH] warn --- __init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/__init__.py b/__init__.py index 2eddda1..36e2f46 100644 --- a/__init__.py +++ b/__init__.py @@ -1426,6 +1426,18 @@ def load_used_glyphs(): a = Font.test_availability(t.font_name, t.face_name, t.text) + if type(a) == type(int()): + if a == Font.MISSING_FONT: + butils.ShowMessageBox("Missing Font", + "ERROR", + [f"Font {t.font_name} is missing.", + "Do you have it installed?"]) + if a is Font.MISSING_FACE: + butils.ShowMessageBox("Missing FontFace", + "ERROR", + [f"Font {t.font_name} is there,", + f"but the FontFace {t.face_name} is missing,", + "Do you have it installed?"]) if len(a["maybe"]) > 0: for fp in a["filepaths"]: butils.load_font_from_filepath(fp, a["maybe"])