From 067f6067366c5b86a8019ed463873ebece8f6163 Mon Sep 17 00:00:00 2001 From: RoGreat Date: Sat, 27 Jun 2026 22:01:36 -0500 Subject: [PATCH] Fix copying fonts with possible read-only permissions --- customtkinter/windows/widgets/font/font_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/font/font_manager.py b/customtkinter/windows/widgets/font/font_manager.py index b3ef369d..ce097585 100644 --- a/customtkinter/windows/widgets/font/font_manager.py +++ b/customtkinter/windows/widgets/font/font_manager.py @@ -55,7 +55,7 @@ def load_font(cls, font_path: str) -> bool: # Linux elif sys.platform.startswith("linux"): try: - shutil.copy(font_path, os.path.expanduser(cls.linux_font_path)) + shutil.copyfile(font_path, os.path.join(os.path.expanduser(cls.linux_font_path), os.path.basename(font_path))) return True except Exception as err: sys.stderr.write("FontManager error: " + str(err) + "\n")