mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 10:19:57 -04:00
Let the launcher replace a cached font file it has registered.
A font file registered with Windows stays open, so writing it failed with Permission denied. When the cached title font was registered but its family could not be used, every start tried to decode it again, failed on the locked file and kept the system font. The registration is now given up before the fonts are decoded again, and an unchanged file is not rewritten. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -315,6 +315,11 @@ class App:
|
||||
got = heard = {}
|
||||
try:
|
||||
if fonts:
|
||||
# The cached files are registered (load_fonts) and were not usable, or this would not run:
|
||||
# registered, Windows keeps them open, and decoding them again failed with "Permission denied"
|
||||
# at every start, so a cache file that had gone bad was never replaced.
|
||||
for path, _family in gamefiles.cached_fonts(self.layout).values():
|
||||
winsys.unregister_font(path)
|
||||
got = gamefiles.extract_fonts(self.layout, game_dir, dump)
|
||||
except Exception as e:
|
||||
self.ctx.log(f'fonts: {e}')
|
||||
|
||||
Reference in New Issue
Block a user