Use a daemon thread for the fontscanner so it doesnt prevent interpreter shutdown

This commit is contained in:
Kovid Goyal 2023-10-17 06:39:27 +05:30
parent bc30dbbdb4
commit 0ca3b990dc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -200,7 +200,7 @@ class FontScanner(Thread):
CACHE_VERSION = 2
def __init__(self, folders=[], allowed_extensions={'ttf', 'otf'}):
Thread.__init__(self)
super().__init__(daemon=True)
self.folders = folders + font_dirs() + [os.path.join(config_dir, 'fonts'),
P('fonts/liberation')]
self.folders = [os.path.normcase(os.path.abspath(f)) for f in