Closed ptanmay143 closed 4 years ago
I understand that the font filenames were previously distributed as Cascadia.ttf
and now it is distributed as CascadiaCode.ttf
. I wonder if the uninstallation of the legacy font should happen during the installation too.
Consider a user is updating his font from 2004.30 release to 2005.15 then,
Cascadia.ttf
from https://github.com/microsoft/cascadia-code/releases/tag/v1911.21CascadiaCode.ttf
from https://github.com/microsoft/cascadia-code/releases/tag/v2004.30CascadiaCode.ttf
from https://github.com/microsoft/cascadia-code/releases/tag/v2005.15Not really sure this is the right place for this fix. If my font package has this issue, then I have to think that others that use the Chocolatey font helpers extension library have this same problem. I'm going to close this PR for now.
Understandable, thanks for mentioning the reason for closing this PR. If you like you could open up an issue in the upstream chocolatey font helper extension library mentioning this issue.
This change adds a test that will check if the font file to be uninstalled actually exists in the system. If the file does not exist in the system, the uninstaller skips the step of trying to uninstall that font file and giving a non-zero error because the file does not exist in the system.
$windowsFonts
variable would ideally point toC:\Windows\Fonts
.$env:SystemRoot
ideally points toC:\Windows
.