Open Stadler76 opened 5 years ago
I assume, issue #3250 is the same issue. Just wanted to create a new issue since that one is lacking any information.
Which font specifically are you using? "Powerline Fonts" isn't terribly descriptive.
Does the font work in other applications after rebooting? Can you share a screenshot of it working in Windows Terminal before rebooting? Thanks.
Which font specifically are you using? "Powerline Fonts" isn't terribly descriptive.
Roboto Mono for Powerline at first, then Noto Mono for Powerline, DejaVu Sans Mono for Powerline and even with Courier New. It seems that every profile gets the fallback to the default font, no matter the fontFace
-setting.
Does the font work in other applications after rebooting?
Outside of the terminal (Using the conhost setting dialogue the fonts work excluding Roboto Mono which is bugged atm (See #295, respectively google/fonts#1832), so that ones off the table for me).
Can you share a screenshot of it working in Windows Terminal before rebooting? Thanks.
Unfortunately I can't provide a screenshot from before restarting Windows. But I'll go check, if restarting Windows and/or reinstalling Terminal helps.
Ok, reinstalling the terminal and or restarting Windows didn't work.
What 'seems' to do the trick was deleting all newly installed Powerline fonts and reinstall them:
To reinstall all of them I've cloned the repo https://github.com/powerline/fonts with GitHub Desktop and ran the install.ps1
in powershell (Used Set-ExecutionPolicy Bypass
before running that script).
Next will be another restart or two to see, if it breaks again.
Ok, same issue after a restart. I've tried to install only a single set: DejaVu Sans Mono for Powerline. It worked, till I've restarted Windows.
In short: Reinstalling the font fixes it and restarting Windows breaks it again. Currently I'm too tired to hunt that issue down any more.
This is really fascinating! I wonder if it reproduces on v0.6? Sorry, I've never seen anything like this before, but we did make some font changes in that release.
Also, if you install the font "for all users" instead of just plain installing it, does it work after a reboot? This might be something fun for the font team to look at.
@DHowett-MSFT wrote:
This is really fascinating! I wonder if it reproduces on v0.6? Sorry, I've never seen anything like this before, but we did make some font changes in that release.
Yes, it reproduces with: Windows Terminal (Preview) Version: 0.6.2951.0
Also, if you install the font "for all users" instead of just plain installing it, does it work after a reboot? This might be something fun for the font team to look at.
Yes, this works fine after a reboot.
When installing it locally (What the install.ps1
actually does) it breaks after a restart, unless:
Did a couple more restarts and installing and uninstalling of fonts, what I've found out so far: I've installed Roboto Mono for Powerline locally and DejaVu Sans Mono for Powerline "for all users". I've switched between those two a couple times and everytime I hit save I saw Roboto broken and DejaVu working thanks to Terminal immediately updating.
So the steps to reproduce should be:
Both fonts always work.
The globally installed (aka for all users) font works fine, the locally installed font breaks/won't load unless you restart the FontCache or disable the service before restarting Windows.
Oh and btw: I wonder, if its the FontCache to blame or how Windows Terminal utilizes it. I guess a bit of both, since the issue with the FontCache described above only exists in the Terminal.
So, Terminal isn't doing anything special with the font cache. We're using DirectWrite, the text rendering API, like most other apps on the system are. Now, I've got one last crazy idea before I escalate this to the fonts team:
If you introduce a delay (say, 30-60 seconds) between steps 6 and 7 ... does it work for you?
Sorry to make you jump through so many hoops. âšī¸
I doubt it does since I usually do a bunch of other thing before restarting the terminal, but I can test it one last time. Gimme a min or ten.
Nope, that didn't WFM. I've waited ~10 mins between restarting Windows and (re)starting Windows Terminal.
Just for funsies I've recorded and cut a brief video, that shows the issue:
PS:
Sorry to make you jump through so many hoops. âšī¸
I've already planned to test with FontCache disabled 'n stuff. Thanks for the hint with the globally installed fonts, btw. And well: Through most of those hoops I've jumped voluntarily or otherwise it would leave me restless. đ
:grin: Thanks for testing for me. I was concerned that Terminal was starting up before the font cache was, and the font cache was somehow not simply a cache, but you've handily blown that theory away.
I'm wrapping this all up to escalate to the team who owns font handling on Windows, since it looks like we're doing "everything we can" here.
btw: I doubt, that its limited to powerline fonts. I assume, it would break with other locally installed fonts as well, but the extra glyphs of those fonts make it easier to visualize the issue.
Just appeared in 0.7
for me (was ok in 0.6
)
I first updated Win10 to 10933.1 Fast Insider (i think i had 19030 before)
Then updated the terminal from the store
I do Confirm on OMyZsh + Agnoster, and also OMyPsh
font installed Delugia Nerd Font Complete
,
https://github.com/adam7/delugia-code/releases/download/v1911.21/Delugia.Nerd.Font.Complete.ttf
https://github.com/adam7/delugia-code/releases/tag/v1911.21
Only using local install too (double click > install), i did not try an "All user install"
What surprise me is that if you use Cascadia Code
(no powerlines yet IIRC) or XXXX Powerlines
right after boot up, the glyph are not rendered the same :
So it's not behaving the same, corrupted buffer or something ?
The re-installing the font and restarting the terminal fixes it until the next reboot. Worth noting I believe the font also doesn't appear in the Windows 10 Fonts when doing a search until you re-install. Running Terminal version 0.9.433.0. Font: Meslo LGM.
@suavelizard one of the workaround is to install the font System Wide and not for the user only. It should properly persist then (this is not optimal but it has fixed this behavior for me)
Yes, installing font system wide fixes the issue.
I came across this issue in Google after experiencing these exact same symptoms. I was using the Nerd Font patched Cascadia Code font (Delugia Nerd Font) and after every reboot the font face would not be recognized in VSCode (I had not opened Windows Terminal to see if it was the same but I suspect it would be).
If I went to Start -> Settings -> Personalisation -> Fonts
and searched for the font it would not show in the list, but if I went to C:\Windows\Fonts\
I would see the font file there. I will see how it goes after performing a full reboot now that I have installed the font system wide.
Edit: confirmed font is still present after a reboot when installing system wide
I was using the Nerd Font patched Cascadia Code font (Delugia Nerd Font) and after every reboot the font face would not be recognized in VSCode (I had not opened Windows Terminal to see if it was the same but I suspect it would be).
Good to know, that this is not a Terminal only issue. But I'm still curious, if this is 100% a font cache issue or if this can be fixed in Windows Terminal.
I have fonts installed (for all) in C:\Windows\Fonts
directory, still Windows Terminal can't use it. Other system fonts can be recognized by the WT though.
Using WT Preview from MS store.
@aasutossh your message was incomprehensible because of the email formatting, so I had to remove it.
What I previously said was, I installed the fonts using the right click option "install for all users", and they were present in the regedit too. But I still couldn't use them (they were nerd fonts).
So I patched the fonts myself and now I can use it. I stopped using ms terminal, I use alacritty now.
OMG! đąđą It was not just me! I have the exact same issue than @Riiskyy and @tebeco But I use WSL on VSCode
After reboot I always have to reinstall my fonts (MesloLGS NF and CaskaydiaCove NF) to work in Windows Terminal/VScode Terminal. If not, they behave as if the fonts have not been installed.
PS: I will test Font System Wide
I don't believe it.. It really fixes the problem when i right-click the .ttf and "Install for all users" Simple as that, after reboot all terminals looking fine with my OMZ powerlevel10k in Windows Terminal or VScode
This is for anyone else who Googles up this issue. Using "Install for all users" was the solution for me as well.
However, go to Start -> Settings -> Personalisation -> Fonts
and search for the font. The name there is the one you want to use. As for me Ubuntu Mono Nerd Font Complete Mono Windows Compatible
did not work, but in the Fonts directory it shows as UbuntuMono NF
and this has correctly worked between reboots and shutdowns.
Cheers @luizwhite @Riiskyy @tebeco big ups. I almost resorted to going to page 2 on Google.
Stupid JSON settings
Make a normal UI for such settings as in CMD.exe. Omg....
Holy crap... 1 year have been passed for the issue. I can't set the Cascadia Mono ExtraLight font face. Only can set default Cascadia Mono.
But in cmd.exe it works well....
This project is a mess....
I experienced this same issue as well. It's especially confusing because the fonts are visible in Word and work fine there, but putting the same font name in Terminal appears to not work. "Install for all users" did resolve the problem for me as well.
This is for anyone else who Googles up this issue. Using "Install for all users" was the solution for me as well.
However, go to
Start -> Settings -> Personalisation -> Fonts
and search for the font. The name there is the one you want to use. As for meUbuntu Mono Nerd Font Complete Mono Windows Compatible
did not work, but in the Fonts directory it shows asUbuntuMono NF
and this has correctly worked between reboots and shutdowns.Cheers @luizwhite @Riiskyy @tebeco big ups. I almost resorted to going to page 2 on Google.
Oops!It works! "go to Start -> Settings -> Personalisation -> Fonts and search for the font " which can get the real name,so the icons won't just be the "âĄ"
Hi, I'm trying to reproduce this issue to see if I can figure out why the fonts are disappearing, and hopefully fix the issue. So far, I haven't been able to get it to happen. I tried cloning the https://github.com/powerline/fonts repo and running the ./install.ps1 script at @Stadler76 described above. For me, the fonts are all installed successfully and remain installed after rebooting. They also remain installed after installing Terminal Preview and rebooting.
Speculating as to what might be happening, I can think of two possibilities. First, let me say that installing a font file basically should do three things:
I suspect that either registry values are not being added in the first place, or they're being added and later removed (e.g., on reboot). Either one would explain the observed behavior. The font initially works because it's been added to the current session, but no longer appears after reboot because it's not in the registry.
I'm wondering if someone who can reproduce this would be willing to help me narrow it down by doing an experiment. Here is what I would like you to try if you are willing:
The registry values for per-user fonts are under "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts". You can export the key to a file using the following command:
reg.exe export "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" fonts.reg
Where fonts.reg is the output file and can be any file name you like. E.g., it could be after-install.reg the first time you run the command after after-reboot the second time.
Thanks, --Nick
@niklasb-ms: Are you by any chance testing this on Windows 11? Because I narrowed it down to be an issue with Windows Font Cache. As you see in the video I recorded, it can be resolved by restarting the Font Cache or by disabling it. If Windows Terminal is running you need to restart it,
I Changed the font in Windows Terminal > Settings > Default > Appearance > Font face, and i saw it concurrently change the "fontFace" object in settings.json to a "font": {"face": "{YOUR_FONT_HERE}"} object, I think the wsl2 has changed the code a bit resulting the fontFace to be deprecated.
Pardon my ignorance, because this is still an issue for me. How do I install a font system wide? I installed the fonts to C:\Windows\Fonts but after rebooting, Windows Terminal says it can no longer find the fonts. I did not have this issue before installed 2H22.
Pardon my ignorance, because this is still an issue for me. How do I install a font system wide?
Right click -> Install for all users
I'm wondering if someone who can reproduce this would be willing to help me narrow it down by doing an experiment. Here is what I would like you to try if you are willing:
- Install the font or fonts the same way as before
- Check if registry values exist for the fonts (see below)
- Check if the font(s) appear in Settings / Personalization / Fonts
- Reboot
- Repeat steps 2-3
@niklasb-ms
This issue never affected me until W11 Update 22H2. Now it happens every time I reboot.
.\install.ps1 -WindowsCompatibleOnly Meslo
2.a. Registry values exist. I ran a diff on both output files and they are exactly the same. 2.b. Note also that font files exist in "C:\Users\simsrw73\AppData\Local\Microsoft\Windows\Fonts", both before and after reboot.
Reinstalling the fonts corrects the issue until next reboot. And as reported above by @Stadler76, restarting the Windows Font Cache Service and restarting Terminal corrects the issue until next reboot.
This issue is driving me crazy. I will run any diagnostic you need, incl allowing remote access to see this resolved.
Output of the two commands after clean install of fonts (manually deleted all previous references to the font in registry and font files) and after reboot:
reg.exe export "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" <file>
fd --glob *meslo* C:\Users\simsrw73\AppData\Local\Microsoft\Windows\Fonts > <file>
In both commands, output of before & after reboot are identical, but fonts no longer show in settings and are not available to use until reinstalled or font cache service is restarted (gsudo Restart-Service -Name "FontCache"
).
Writing this here as well, since I accidentall wrote my reply in the closed #12587 issue, which looks like a duplicate.
For me it also started after the Window 11 22H2 update. It seems like it looses all user installed fonts.
The old control panel still shows the fonts, but they are missing from the new set settings Personalization/Fonts and Windows programs.
Like above, restarting the Windows Font Cache Service, seems to make it work again.
Could anyone find any workaround yet? I'm having the same issue. I have Windows 10 Enterprise. My windows version is 22H2 tried installing powerline fonts from the repo above as the author did and exported the registry. I can see all the fonts are installed correctly everywhere, but the issue persists.
The only workaround is to restart the FontCache service. I setup task scheduler to do this at startup
Apparently, reinstalling Windows also fixes this. Just upgraded my GPU from Nvidia to AMD and Windows started crashing periodically. Even after using GPU driver removal tool and reinstalling AMD, so I tried reinstalling Windows. Both issues seem to be fixed. No crashing and No font problems in wt. No idea what causes the issue but, in my case, reinstalling Windows seems have resolved it. That is a horrible solution. I wish someone could have helped debug the cause of the issue.
Currently in the camp where none of the proposed workarounds remedy the issue for me. Anyone manage to resolve this issue with any of the Iosevka Nerd Fonts in a way not listed above?
+1 Having this w/ multiple fonts. Victor Mono as of today.
I seem to have fixed this issue on Windows 11 latest updates as of 7/4/2023:
windows key -> services -> services (local) -> Windows Font Cache Service
In this window, select tab "Log On", and use "Local System Account", also check "Allow service to interact ..."
Click "Ok"
Then stop and start service
Okay so housecleaning time. Internally, this is tracked by MSFT:42103854.
After the last couple PRs we did in this area, we're pretty confident there's nothing more that we (the Terminal team) can do on our side here to mitigate this.
This is pretty clearly still an issue. I'm bumping the internal thread to see how we can get this fixed in the OS.
I've decided that even though there's nothing more we (the Terminal team) can do to fix this on our side, I'm going to leave this one open. Folks have a hard enough time searching for existing open issues, let alone closed ones. This is super painful when it does hit, so I think it warrants being left open regardless of if there's any work we can do to fix it.
I have no idea when this'll be fixed, but I'll make sure to share any relevant internal updates here in this thread.
I seem to have fixed this issue on Windows 11 latest updates as of 7/4/2023:
windows key -> services -> services (local) -> Windows Font Cache Service
In this window, select tab "Log On", and use "Local System Account", also check "Allow service to interact ..."
Click "Ok"
Then stop and start service
Yoppe seems to work.
I seem to have fixed this issue on Windows 11 latest updates as of 7/4/2023:
windows key -> services -> services (local) -> Windows Font Cache Service
In this window, select tab "Log On", and use "Local System Account", also check "Allow service to interact ..."
Click "Ok"
Then stop and start service
This worked for me too! after months of issues with the nerd fonts in Terminal and VSCode. Thank you!
I seem to have fixed this issue on Windows 11 latest updates as of 7/4/2023:
windows key -> services -> services (local) -> Windows Font Cache Service
In this window, select tab "Log On", and use "Local System Account", also check "Allow service to interact ..."
Click "Ok"
Then stop and start service
Workaround confirming to still work as of today (10/23/23)
I seem to have fixed this issue on Windows 11 latest updates as of 7/4/2023: windows key -> services -> services (local) -> Windows Font Cache Service In this window, select tab "Log On", and use "Local System Account", also check "Allow service to interact ..." Click "Ok" Then stop and start service
Yoppe seems to work.
work for me same as of today (24-Oct-2023) with windows 11 latest version
Please use upvotes/reactions if you agree with a post. A lot of people are subscribed to this thread and each confirmation pings everyone every time, so please avoid doing that. I'm collapsing the above comments as off-topic.
Pardon my ignorance, because this is still an issue for me. How do I install a font system wide?
Right click -> Install for all users
sorry...right click on what?
Environment
Steps to reproduce
fontFace
for various profiles (Tested with powershell, cmd and Ubuntu WSL) Note, that everything was working as intended up to here.Expected behavior
The font setting being applied:
Actual behavior
After restarting Windows
fontFace
is being ignored:Additional Info
My current profiles.json: profiles.txt