fixed font loading init

This commit is contained in:
TomSchimansky
2022-05-21 00:25:07 +02:00
parent afe44f4ff7
commit 4b48bf57b2
3 changed files with 9 additions and 6 deletions

View File

@@ -27,6 +27,8 @@ FontManager.load_font(os.path.join(script_directory, "assets", "fonts", "Roboto"
# load font necessary for rendering the widgets on Windows, Linux
if FontManager.load_font(os.path.join(script_directory, "assets", "fonts", "CustomTkinter_shapes_font-fine.otf")) is True:
Settings.circle_font_is_ready = True
else:
Settings.circle_font_is_ready = False
if Settings.preferred_drawing_method == "font_shapes":
sys.stderr.write("customtkinter.__init__ warning: " +

View File

@@ -10,8 +10,10 @@ try:
sys.stderr.write("WARNING: You have to update the darkdetect library: pip3 install --upgrade darkdetect\n")
if sys.platform != "darwin":
exit()
except:
pass
except ImportError as err:
raise err
except Exception:
sys.stderr.write("customtkinter.appearance_mode_tracker warning: failed to import darkdetect")
class AppearanceModeTracker: