Display a dialog when the user selects an invalid font #1359

Closed
opened 2026-01-30 22:23:34 +00:00 by claunia · 11 comments
Owner

Originally created by @matt2405warner on GitHub (May 25, 2019).

Summary of the new feature/enhancement

Currently when changing the 'fontFace' to a font that doesn't exist the font size just gets so small (~0.5 font size) that you can't read the text.

Proposed technical implementation details (optional)

It would be nice if the terminal informed the user that the font is not valid - Maybe a pop-up/modal?

Originally created by @matt2405warner on GitHub (May 25, 2019). # Summary of the new feature/enhancement Currently when changing the 'fontFace' to a font that doesn't exist the font size just gets so small (~0.5 font size) that you can't read the text. # Proposed technical implementation details (optional) It would be nice if the terminal informed the user that the font is not valid - Maybe a pop-up/modal?
Author
Owner

@metathinker commented on GitHub (May 26, 2019):

I also see an earlier report (#550) that Terminal would actually crash when a profile referred to a nonexistent font name. Is that not happening anymore? Perhaps that problem was partially fixed, resulting in what you see.

@metathinker commented on GitHub (May 26, 2019): I also see an earlier report (#550) that Terminal would actually crash when a profile referred to a nonexistent font name. Is that not happening anymore? Perhaps that problem was partially fixed, resulting in what you see.
Author
Owner

@matt2405warner commented on GitHub (May 26, 2019):

I haven't had it crash on me yet when I change the font to an invalid one. It just makes the font extremely small.

@matt2405warner commented on GitHub (May 26, 2019): I haven't had it crash on me yet when I change the font to an invalid one. It just makes the font extremely small.
Author
Owner

@zadjii-msft commented on GitHub (May 28, 2019):

Well this is definitely relevant to #610, @miniksa might be interested in knowing that. I was certainly under the impression we'd crash when the font wasn't found.

@zadjii-msft commented on GitHub (May 28, 2019): Well this is definitely relevant to #610, @miniksa might be interested in knowing that. I was certainly under the impression we'd crash when the font wasn't found.
Author
Owner

@miniksa commented on GitHub (May 28, 2019):

I mean, literally anyone who isn't me can go F5 the thing in Visual Studio setting a breakpoint in dxrenderer.cpp where it hands your font preference into DirectWrite's layout and see what it comes back with to reason out why this is. I think it's GetProposedFont method.

But if no one else does that, I'll get to this eventually.

@miniksa commented on GitHub (May 28, 2019): I mean, literally anyone who isn't me can go F5 the thing in Visual Studio setting a breakpoint in `dxrenderer.cpp` where it hands your font preference into DirectWrite's layout and see what it comes back with to reason out why this is. I think it's `GetProposedFont` method. But if no one else does that, I'll get to this eventually.
Author
Owner

@metathinker commented on GitHub (Jun 2, 2019):

Well, for what it's worth, I can't reproduce this problem. I gave a profile a nonexistent font name and Terminal crashed as per #550 when creating a tab with that profile; it didn't show a tab with tiny text as you report here.

@metathinker commented on GitHub (Jun 2, 2019): Well, for what it's worth, I can't reproduce this problem. I gave a profile a nonexistent font name and Terminal crashed as per #550 when creating a tab with that profile; it didn't show a tab with tiny text as you report here.
Author
Owner

@matt2405warner commented on GitHub (Jun 7, 2019):

@metathinker this occurred when I had a terminal tab already open when I was editing the profile. @zadjii-msft are you at least informing the user why the terminal crashed?

@matt2405warner commented on GitHub (Jun 7, 2019): @metathinker this occurred when I had a terminal tab already open when I was editing the profile. @zadjii-msft are you at least informing the user why the terminal crashed?
Author
Owner

@zadjii-msft commented on GitHub (Jun 7, 2019):

@matt2405warner considering the terminal was hard crashing, I don't think the app had a chance to catch the exception that triggered the crash. Now that #903 is complete, we certainly can add another message here

@zadjii-msft commented on GitHub (Jun 7, 2019): @matt2405warner considering the terminal was hard crashing, I don't think the app had a chance to catch the exception that triggered the crash. Now that #903 is complete, we certainly can add another message here
Author
Owner

@kmoberg commented on GitHub (Jul 31, 2019):

I also see an earlier report (#550) that Terminal would actually crash when a profile referred to a nonexistent font name. Is that not happening anymore? Perhaps that problem was partially fixed, resulting in what you see.

I've tried changing to a non-existent font today, and it hard-crashes the entire application when I do.

@kmoberg commented on GitHub (Jul 31, 2019): > I also see an earlier report (#550) that Terminal would actually crash when a profile referred to a nonexistent font name. Is that not happening anymore? Perhaps that problem was partially fixed, resulting in what you see. I've tried changing to a non-existent font today, and it hard-crashes the entire application when I do.
Author
Owner

@miniksa commented on GitHub (Jul 31, 2019):

@kmoberg, I fixed #550 19 hours ago. It'll be in the next release or you can build from master to get the fix.

However, the way I fixed it just resulted in the DX renderer trying things until it can find a font. If we're to add a dialog too, we probably need to detect that the requested font doesn't match the returned font and display.

I can take the issue from here.

@miniksa commented on GitHub (Jul 31, 2019): @kmoberg, I fixed #550 19 hours ago. It'll be in the next release or you can build from master to get the fix. However, the way I fixed it just resulted in the DX renderer trying things until it can find a font. If we're to add a dialog too, we probably need to detect that the requested font doesn't match the returned font and display. I can take the issue from here.
Author
Owner

@offero commented on GitHub (Aug 6, 2019):

How do you find the string that represents the font variant you want?

@offero commented on GitHub (Aug 6, 2019): How do you find the string that represents the font variant you want?
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8207, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8207, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1359