jason-jxc / FontReg

FontReg.exe is intended as a replacement for Microsoft's outdated fontinst.exe
38 stars 7 forks source link

Not working for me - Windows 11 #2

Open eggbean opened 10 months ago

eggbean commented 10 months ago

Does this still work with Windows 11? It's not working for me consistantly. It does work sometimes, but most the time it doesn't and the fonts that do or don't get installed is not consistant either.

I have this in a batch script that I use to setup Windows. It's run as admin.

:: Install fonts
pushd %USERPROFILE%\winfiles\fonts
for /d %%F in (*) do pushd "%%F" & %USERPROFILE%\winfiles\bin\fontreg /copy & echo %%~nxF fonts installed & popd
popd

When it's run it appears to run okay and of course there are no error codes, but then Windows Terminal still complains that it cannot use the fonts that it's configured to use and I cannot see them in the fonts directory. Sometimes some of the fonts are installed.

I also tried manually typing fontreg /copy in an elevated command prompt while in the same directory as the fonts, but it still didn't install them.

These are the fonts I am using (latest versions from https://www.nerdfonts.com/):

webadmin@hydra:~\winfiles\fonts> tree
.
├── Caskaydia Cove
│   ├── CaskaydiaCoveNerdFontMono-Bold.ttf
│   ├── CaskaydiaCoveNerdFontMono-BoldItalic.ttf
│   ├── CaskaydiaCoveNerdFontMono-Italic.ttf
│   └── CaskaydiaCoveNerdFontMono-Regular.ttf
├── Hack
│   ├── HackNerdFontMono-Bold.ttf
│   ├── HackNerdFontMono-BoldItalic.ttf
│   ├── HackNerdFontMono-Italic.ttf
│   └── HackNerdFontMono-Regular.ttf
├── Iosevka Term Slab
│   ├── IosevkaTermSlabNerdFontMono-Bold.ttf
│   ├── IosevkaTermSlabNerdFontMono-BoldItalic.ttf
│   ├── IosevkaTermSlabNerdFontMono-Italic.ttf
│   ├── IosevkaTermSlabNerdFontMono-Medium.ttf
│   ├── IosevkaTermSlabNerdFontMono-MediumItalic.ttf
│   └── IosevkaTermSlabNerdFontMono-Regular.ttf
└── Iosevka Term
    ├── IosevkaTermNerdFontMono-Bold.ttf
    ├── IosevkaTermNerdFontMono-BoldItalic.ttf
    ├── IosevkaTermNerdFontMono-Italic.ttf
    ├── IosevkaTermNerdFontMono-Medium.ttf
    ├── IosevkaTermNerdFontMono-MediumItalic.ttf
    └── IosevkaTermNerdFontMono-Regular.ttf
d-buchmann commented 9 months ago

Where is %USERPROFILE% located on disk? I just stumbled up on the same issue and found out that if run from a mapped network drive, the fonts wouldn't install, but if I copied the whole folder to a local drive, it worked just fine (Win10 and 11 tested).

eggbean commented 9 months ago

It's non-standard, as I've put user profiles on a different partition.

%USERPROFILE% == F:\Users\jason

Windows is on C: in the usual place. Since I made the post above, I now don't think this issue has anything to do with FontReg as the fonts don't install when I manually drag them into the Fonts directory in Explorer. I think there is something wrong with the new Nerd Fonts, since I upgraded to the latest ones with new file names (supposedly the same between Windows and Linux?). The previous ones worked fine (with FontReg or manually installed).

If I can't find out what's going on with this I think I'll just use older versions of the Nerd Fonts as the previous ones I was using (from two or three years back) worked fine. At the moment I have frustrating problems with the defined fonts not working in Windows Terminal, so it defaults to Cascadia Code.

Are you using the latest Nerd Fonts too?

d-buchmann commented 9 months ago

I'm using other fonts, but I tried Hack Nerd Font out of curiosity. I can't imagine that those cause the issue unless someone convinces me otherwise. On my Win10, all works well. Will test on Win11 shortly. You can look in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts if the fonts are listed and you can check the %errorlevel% of the FontReg command. To manually install a font, have do double-click it (i.e. open it with fontview), then click install. Does this work for you consistently?