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

CONHOST fonts problem #18042

Closed
0wwafa opened this issue Oct 13, 2024 · 14 comments
Closed

CONHOST fonts problem #18042

0wwafa opened this issue Oct 13, 2024 · 14 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@0wwafa
Copy link

0wwafa commented Oct 13, 2024

Not only the unicode fonts don't show all characters but look at this:

Image

Can anyone tell me what can cause this?

I am even using another version of conhost (the original of 2019 in the windows recovery disk)

The problem is NOT conhost itself but something in the system that has been modified by some recent update.

Can someone please help me understand this?

In CONHOST in the image above the font is wrong and the size is like it has a different dpi

Look at this... again: putty and notepad are correct.

Image

@microsoft-github-policy-service microsoft-github-policy-service bot 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 13, 2024
@0wwafa
Copy link
Author

0wwafa commented Oct 13, 2024

And also in microsoft edge.
Image

Can someone please help me?

@DHowett
Copy link
Member

DHowett commented Oct 13, 2024

It’s the weekend for us Microsoft folks. Most of my team doesn’t work weekends!

Size difference aside (see the next comment for details), you appear to be having a systemwide font problem that isn’t directly associated with the console. Can you roll back the update and file feedback in the Feedback Hub?

@DHowett
Copy link
Member

DHowett commented Oct 13, 2024

As a note: conhost currently–and pretty much always has–measures font sizes in pixels (cell height) whereas almost all other applications measure font sizes in points. 16 in conhost will be smaller than 16 in Notepad and Edge, as 16 in conhost means “make the cell height 16 pixels”

This is a fairly well-known quirk of the console on Windows that we aren’t planning on changing.

@0wwafa
Copy link
Author

0wwafa commented Oct 14, 2024

Size difference aside (see the next comment for details), you appear to be having a systemwide font problem that isn’t directly associated with the console. Can you roll back the update and file feedback in the Feedback Hub?

No problem for the size.. glad to know isn't related to my problem. But I hace no font issue. At least I am pretty sure something else prevent the fonts to work correctly in SOME but not all programs.
But I don't see any relevant log in event viewer nor in process monitor (I posted it in another issue) perhaps I can't see it.
I wish to dig the cause instead of performing an in-place upgrade/repair. My system is quite customized and I don't want to set everything up again. Also I am on a metered connection and I will have to reupdate everything. I wish to find a fix. I bet is some permission or some other program interfering.

@0wwafa
Copy link
Author

0wwafa commented Oct 14, 2024

I fixed one of the TWO problems, now unicode works in chrome and anywhere except conhost running bash.exe.

Image

@0wwafa
Copy link
Author

0wwafa commented Oct 14, 2024

Second update: also openconsole bash.exe now works!
Image

The windows 10 conhost.exe instead still works only with cascadia.
Any Idea what it can be?

if YOU do: c:\windows\system32\conhost.exe bash ~ does unicode works with all unicode fonts?

@lhecker
Copy link
Member

lhecker commented Oct 14, 2024

I'm happy to hear that you could resolve your font issue, although it's unclear to me why it broke in the first place. I was under the impression that it still worked when you filed #18024. That aside...

The windows 10 conhost.exe instead still works only with cascadia.

To repeat what I said in #18024:

Conclusion: If you use Windows 10 conhost with braille glyphs but your font does not support braille glyphs they will shop us as ? symbols.

Do you have any other questions that aren't related to font fallback and those ? symbols?

@lhecker
Copy link
Member

lhecker commented Oct 14, 2024

I should add: We are just roughly ~2 developers on this project right now and have >100M users to support. If your issue is not caused by conhost then we must close it to focus on those people that have an issue that is caused by it.
Currently it appears you don't have an issue caused by conhost, because the lack of font fallback is known and has been fixed in Windows 11.

If you can show that there's an issue with font rendering on Windows, then I'll gladly report a bug internally for you. Unless it's a font rendering issue in conhost, because conhost does not support font fallback and has not supported font fallback for 10+ years between Windows 8 and 11.

@0wwafa
Copy link
Author

0wwafa commented Oct 15, 2024

Conclusion: If you use Windows 10 conhost with braille glyphs but your font does not support braille glyphs they will shop us as ? symbols.

Do you have any other questions that aren't related to font fallback and those ? symbols?

Yes. But just so you know, NPM uses braille unicode for the loading animation.
And NPM is quite spread.

The dots in the braille unicode are useful for many thing (but also a lot of other characters are missing without the fallback.

IMHO conhost should support font fallback as even NOTEPAD does.

@DHowett
Copy link
Member

DHowett commented Oct 15, 2024

IMHO conhost should support font fallback as even NOTEPAD does.

It does. In modern versions of Windows. Not ones where the console subsystem hasn’t seen meaningful changes since 2020.

If you want the improvements we’ve been working on for the past five years, use Windows 11, use Windows Terminal, or replace conhost with a build from a newer version of Windows.

Regardless of what conhost should and should not do, and what notepad does or does not do, you’re stuck with no font fallback in the console until you avail yourself of one of those three options.

@0wwafa
Copy link
Author

0wwafa commented Oct 16, 2024

@DHowett anyway now after the fix, OpenConsole.exe seems to work.

@0wwafa
Copy link
Author

0wwafa commented Oct 16, 2024

I'm happy to hear that you could resolve your font issue, although it's unclear to me why it broke in the first place.

No Idea.. I noticed last week, what I was busy on a project... yesterday I dug in the problem and finally solved it.
Now all fonts are ok (there were no missing fonts before, but some registry keys got corrupted/missing somehow).
So I checked a few font related keys in registry then copied from another system, then reinstalled all fonts and finally did an sfc /scannow and dism restorehealth...

@0wwafa
Copy link
Author

0wwafa commented Oct 16, 2024

@lhecker after some more testing, everything is "sort of" working in OpenConsole.exe.

The only things I dont understand are:

  1. Why SF Mono does not show up (it does in other apps including mintty and pterm)

  2. why the cursor sometimes "ghosts" on previous lines (expecially when using openconsole.exe to run bash.exe)

@lhecker
Copy link
Member

lhecker commented Oct 16, 2024

Why SF Mono does not show up (it does in other apps including mintty and pterm)

I suspect you may still have a corrupted font database. You should make sure that your font exists in C:\Windows\Fonts. The %LOCALAPPDATA%\Microsoft\Windows\Fonts folder should be entirely empty. Afterwards, I'd uninstall the affected fonts and reinstall them.

why the cursor sometimes "ghosts" on previous lines (expecially when using openconsole.exe to run bash.exe)

That's probably a legitimate bug in our text renderer. We can continue talking about it over in #18038.

I'll be closing this issue for now, as there's nothing we can do about font fallback on Windows 10 at the moment. We can continue talking in #18038 about the cursor ghosting, and in #18044 about replacing conhost with OpenConsole.

@lhecker lhecker closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants