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

Unable to find the selected font "Cascadia Mono" in Windows 10 #12420

Closed
anthonypants opened this issue Feb 7, 2022 · 15 comments · Fixed by #12554
Closed

Unable to find the selected font "Cascadia Mono" in Windows 10 #12420

anthonypants opened this issue Feb 7, 2022 · 15 comments · Fixed by #12554
Assignees
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@anthonypants
Copy link

Windows Terminal version

1.13.10336.0

Windows build number

10.0.19044.0

Other Software

I have both Windows Terminal (1.11.3471.0) and Windows Terminal Preview (1.13.10336.0) installed. The Store says Windows Terminal Preview updated today, but both apps are unable to find the "Cascadia Mono" font, which I'm told should be bundled with the app.

Steps to reproduce

Open Windows Terminal Preview

Expected Behavior

A "Warning" popup does not appear.

Actual Behavior

A "Warning" popup in the Terminal window appears with the following text

Unable to find the selected font "Cascadia Mono".

"Consolas" has been selected instead.

Please either install the missing font or choose another one.
@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 Feb 7, 2022
@rlabrecque
Copy link

Again?! :(

This was a really annoying issue some 5+ months ago. Not great that it's popped up again.

@zadjii-msft
Copy link
Member

Thanks for the suggestion! Please make sure to search for duplicates when filing new issues. This is already being tracked by another issue on our repo - please refer to #11648 for more discussion.

/dup #11648

@ghost
Copy link

ghost commented Feb 8, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Feb 8, 2022
@lhecker
Copy link
Member

lhecker commented Feb 18, 2022

FYI: When I implemented a fix I used APIs which only work on Windows 11.
Today I made some changes to make it work on Windows 10. I'll open a PR soon.

@lhecker lhecker reopened this Feb 18, 2022
@lhecker lhecker added Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. and removed Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. labels Feb 18, 2022
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Feb 18, 2022
@lhecker lhecker changed the title Unable to find the selected font "Cascadia Mono" Unable to find the selected font "Cascadia Mono" in Windows 10 Feb 18, 2022
@lhecker
Copy link
Member

lhecker commented Feb 18, 2022

I'm repurposing this issue to submit a change for Windows 10 support.

@lhecker lhecker self-assigned this Feb 18, 2022
@ghost ghost added the In-PR This issue has a related PR label Feb 23, 2022
@zadjii-msft zadjii-msft added this to the Terminal v1.14 milestone Mar 2, 2022
@ghost ghost closed this as completed in #12554 Mar 10, 2022
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Mar 10, 2022
ghost pushed a commit that referenced this issue Mar 10, 2022
By replacing `IDWriteFontSetBuilder2::AddFontFile` with
`IDWriteFactory5::CreateFontFileReference` and
`IDWriteFontSetBuilder1::AddFontFile` we add nearby
font loading support for Windows 10, build 15021.

This commit also fixes font fallback for AtlasEngine,
which was crashing during testing.

Finally it fixes a bug in DxEngine, where we only created a "nearby" font
collection if we couldn't find the font in the system collection. This doesn't
fix the bug, if the font is locked or broken in the system collection.

This is related to #11648.

## PR Checklist
* [x] Closes #12420
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* Build a Debug version of Windows Terminal
* Put Jetbrains Mono into the writeable AppX directory
* Jetbrains Mono is present in the settings UI ✅
* DxEngine works with Jetbrains Mono ✅
* AtlasEngine works with Jetbrains Mono ✅
DHowett pushed a commit that referenced this issue Mar 10, 2022
By replacing `IDWriteFontSetBuilder2::AddFontFile` with
`IDWriteFactory5::CreateFontFileReference` and
`IDWriteFontSetBuilder1::AddFontFile` we add nearby
font loading support for Windows 10, build 15021.

This commit also fixes font fallback for AtlasEngine,
which was crashing during testing.

Finally it fixes a bug in DxEngine, where we only created a "nearby" font
collection if we couldn't find the font in the system collection. This doesn't
fix the bug, if the font is locked or broken in the system collection.

This is related to #11648.

## PR Checklist
* [x] Closes #12420
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* Build a Debug version of Windows Terminal
* Put Jetbrains Mono into the writeable AppX directory
* Jetbrains Mono is present in the settings UI ✅
* DxEngine works with Jetbrains Mono ✅
* AtlasEngine works with Jetbrains Mono ✅

(cherry picked from commit f84ccad)
DHowett pushed a commit that referenced this issue Mar 15, 2022
By replacing `IDWriteFontSetBuilder2::AddFontFile` with
`IDWriteFactory5::CreateFontFileReference` and
`IDWriteFontSetBuilder1::AddFontFile` we add nearby
font loading support for Windows 10, build 15021.

This commit also fixes font fallback for AtlasEngine,
which was crashing during testing.

Finally it fixes a bug in DxEngine, where we only created a "nearby" font
collection if we couldn't find the font in the system collection. This doesn't
fix the bug, if the font is locked or broken in the system collection.

This is related to #11648.

* [x] Closes #12420
* [x] I work here
* [x] Tests added/passed

* Build a Debug version of Windows Terminal
* Put Jetbrains Mono into the writeable AppX directory
* Jetbrains Mono is present in the settings UI ✅
* DxEngine works with Jetbrains Mono ✅
* AtlasEngine works with Jetbrains Mono ✅

(cherry picked from commit f84ccad)
@ghost
Copy link

ghost commented Mar 25, 2022

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

Handy links:

@srdjanjovcic
Copy link
Member

This is not fixed in Preview 1.13.10983.0

@srdjanjovcic
Copy link
Member

My Windows Terminal Preview was updated today, so it is clear that update is still broken. What is a workaround?

@zadjii-msft
Copy link
Member

@srdjanjovcic Are you seeing this with specifically "Cascadia Mono" or "Cascadia Code"? That's HIGHLY unexpected even with this fix. Which OS version are you on?

@srdjanjovcic
Copy link
Member

@zadjii-msft It is "Cascadia Mono" (can't stand the ligatures). I am on Windows 10.

@zadjii-msft
Copy link
Member

Huh. @lhecker & @DHowett for visibility. Any ideas if we left in any logging do diagnose why the preemptive fallback wouldn't be working?

@lhecker
Copy link
Member

lhecker commented Apr 13, 2022

@zadjii-msft Yes, the entire nearby font loader function can only exit with debug logs on error. It should be possible to see what's going on with DebugView.
IIRC we did test this on Windows 10 (15021 and later) and it seems to work at least for some according to #12879.

@srdjanjovcic
Copy link
Member

srdjanjovcic commented Apr 13, 2022

Well, my repro is already gone, unless you have debug logs in some file in somewhere (temp folder?)

This is Windows 10.0.19044.1586, latest publicly available version (21H2).

@srdjanjovcic
Copy link
Member

Just updated Windows Terminal Preview on other Windows 10 machine (same version), and bug didn't repro.

@lhecker
Copy link
Member

lhecker commented Apr 14, 2022

@srdjanjovcic I think I've figured out what went wrong. See #12904.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants