Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'fontFace' not working for any profile after system reboot. #3257

Open
Stadler76 opened this issue Oct 19, 2019 · 55 comments
Open

'fontFace' not working for any profile after system reboot. #3257

Stadler76 opened this issue Oct 19, 2019 · 55 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase Tracking-External This bug isn't resolved, but it's following an external workitem.
Milestone

Comments

@Stadler76
Copy link

Environment

  • Microsoft Windows [Version 10.0.18362.418]
  • Windows Terminal (Preview) Version: 0.5.2762.0
  • Ubuntu subsystem with Oh My Zsh using the agnoster theme with Powerline Fonts installed.

Steps to reproduce

  1. Setup Windows Terminal (With Ubuntu subsystem)
  2. Set the fontFace for various profiles (Tested with powershell, cmd and Ubuntu WSL)
    Note, that everything was working as intended up to here.
  3. Restart Windows.

Expected behavior

The font setting being applied:
grafik
grafik

Actual behavior

After restarting Windows fontFace is being ignored:
grafik
grafik

Additional Info

My current profiles.json: profiles.txt

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 19, 2019
@Stadler76
Copy link
Author

I assume, issue #3250 is the same issue. Just wanted to create a new issue since that one is lacking any information.

@DHowett-MSFT
Copy link
Contributor

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.

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Oct 21, 2019
@Stadler76
Copy link
Author

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.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Oct 21, 2019
@Stadler76
Copy link
Author

Stadler76 commented Oct 21, 2019

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:
grafik
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.

@Stadler76
Copy link
Author

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.

@DHowett-MSFT
Copy link
Contributor

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.

@DHowett-MSFT
Copy link
Contributor

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 DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Oct 23, 2019
@Stadler76
Copy link
Author

Stadler76 commented Oct 24, 2019

@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:

  • You disable the Windows FontCache Service or
  • You restart the Windows FontCache Service

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:

Steps to reproduce

  1. Setup oh-my-zsh with the agnoster theme (I guess oh-my-posh should show the same error).
  2. Now install one Powerline-font locally (for example Roboto Mono for Powerline) aka mark all font files → Right click → Install.
  3. Install one Powerline-font for all users (for example DejaVu Sans Mono for Powerline) aka mark all font files → Right click → Install for all users.
  4. Make sure the Windows FontCache service is running and set to start automatically (should be the default).
  5. Setup the profile to use the locally installed font and check, if it still works.
  6. Restart Windows.
  7. Restart Windows Terminal.
  8. Switch the fonts in the config back and forth between those two.

Expected behaviour

Both fonts always work.

Actual behavior

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.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Oct 24, 2019
@Stadler76
Copy link
Author

Stadler76 commented Oct 24, 2019

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.

@DHowett-MSFT
Copy link
Contributor

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. ☹️

@Stadler76
Copy link
Author

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.

@Stadler76
Copy link
Author

Stadler76 commented Oct 24, 2019

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:
Fontcache issue with locally installs font in Windows Terminal Preview

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. 😉

@DHowett-MSFT
Copy link
Contributor

😁
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.

@DHowett-MSFT DHowett-MSFT self-assigned this Oct 24, 2019
@DHowett-MSFT DHowett-MSFT added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-External For issues that are outside this codebase and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 24, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 24, 2019
@simsrw73
Copy link

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.

@Roundlay
Copy link

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?

@rscircus
Copy link

+1 Having this w/ multiple fonts. Victor Mono as of today.

@dgarmire
Copy link

dgarmire commented Jul 4, 2023

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

@zadjii-msft zadjii-msft added Tracking-External This bug isn't resolved, but it's following an external workitem. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 24, 2023
@zadjii-msft
Copy link
Member

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.

@arpadbarta

This comment was marked as off-topic.

@fuzzlebuck

This comment was marked as off-topic.

@ededdneddyfan

This comment was marked as off-topic.

@Dharmesh-IT

This comment was marked as off-topic.

@lhecker
Copy link
Member

lhecker commented Oct 24, 2023

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.

@vanguard-bit
Copy link

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?

@AndrewSav
Copy link

AndrewSav commented Jan 1, 2024

sorry...right click on what?

On the font you want to install?

@mknepper
Copy link

mknepper commented Feb 9, 2024

Can confirm I am still having this issue with fonts in Windows Terminal on Windows 11 Pro.

@mayank-kr-verma
Copy link

mayank-kr-verma commented May 20, 2024

This superuser answer worked for me on windows 11

@come-raczy
Copy link

come-raczy commented Jun 4, 2024

This superuser answer worked for me on windows 11

Interesting. In my case, even if I reinstall the fonts in Settings -> Personalization -> Fonts, I still have the error when I try to use the font in the terminal.

What did work for me was to remove the fonts, clear the Windows Font Cache Service, and reinstall the fonts for all:

  • in Control Panel -> Appearance and Personalization -> Fonts, select the Nerd Fonts, Click "Delete" and confirm
  • Win-R -> Open: services.msc -> Windows Font Cache Service -> right click -> Restart
  • In the file explorer, select the fonts -> Right click -> Show More Options -> Install for all Users (requires admin privileges)

I verified that after rebooting or shutting down, all the nerd fonts are still available in Settings -> Personalization -> Fonts, and correctly set in my Terminal.

@lukeupup
Copy link

This superuser answer worked for me on windows 11

Interesting. In my case, even if I reinstall the fonts in Settings -> Personalization -> Fonts, I still have the error when I try to use the font in the terminal.

What did work for me was to remove the fonts, clear the Windows Font Cache Service, and reinstall the fonts for all:

  • in Control Panel -> Appearance and Personalization -> Fonts, select the Nerd Fonts, Click "Delete" and confirm
  • Win-R -> Open: services.msc -> Windows Font Cache Service -> right click -> Restart
  • In the file explorer, select the fonts -> Right click -> Show More Options -> Install for all Users (requires admin privileges)

I verified that after rebooting or shutting down, all the nerd fonts are still available in Settings -> Personalization -> Fonts, and correctly set in my Terminal.

This works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase Tracking-External This bug isn't resolved, but it's following an external workitem.
Projects
None yet
Development

No branches or pull requests