To delete the font file, you may need to start an independent process or script that waits a few seconds and then tries to delete the file (checking for an error and retrying until successful), then close the process that was using the font.