UseDx option no longer works in conhost #2870

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

Originally created by @j4james on GitHub (Jul 21, 2019).

Environment

Windows build number: Version 10.0.18362.175
Windows Terminal version (if applicable): Locally built from commit dca0ffe

Steps to reproduce

  1. Set the DWORD registry value HKCU\Console\UseDx to 1 to enable the DirectX renderer that supports font fallback.
  2. Build the latest source (or at least commit dca0ffe).
  3. Start a bash shell in conhost with the tools\openbash script.
  4. Try outputting a character that would usually require font fallback, for example:
    echo -e "\u273f"

Expected behavior

I'd expect to see the actual glyph requested. In the case of the U+273F example above, a black florette.

Actual behavior

The font fallback doesn't work and you just see a question mark error glyph.

I believe this is a regression caused by the Windows 8.1 version check introduced in PR #1274. I'm guessing it might be because VerifyVersionInfo returns false when called by applications that do not have a compatibility manifest (according to the docs here).

Whatever the reason, removing the version check fixes the problem for me. Not that I'm suggesting that's the solution - just confirming what I believe is the source of the problem.

Originally created by @j4james on GitHub (Jul 21, 2019). # Environment Windows build number: Version 10.0.18362.175 Windows Terminal version (if applicable): Locally built from [commit dca0ffe](https://github.com/microsoft/terminal/commit/dca0ffe6dd0f76ca7997807424a2c08684e07751) # Steps to reproduce 1. Set the DWORD registry value `HKCU\Console\UseDx` to `1` to enable the DirectX renderer that supports font fallback. 2. Build the latest source (or at least [commit dca0ffe](https://github.com/microsoft/terminal/commit/dca0ffe6dd0f76ca7997807424a2c08684e07751)). 3. Start a bash shell in conhost with the `tools\openbash` script. 4. Try outputting a character that would usually require font fallback, for example: ```echo -e "\u273f"``` # Expected behavior I'd expect to see the actual glyph requested. In the case of the U+273F example above, a [black florette](https://unicode-table.com/en/273F/). # Actual behavior The font fallback doesn't work and you just see a question mark error glyph. I believe this is a regression caused by the Windows 8.1 version check introduced in PR #1274. I'm guessing it might be because `VerifyVersionInfo` returns false when called by applications that do not have a compatibility manifest (according to the docs [here](https://docs.microsoft.com/en-gb/windows/win32/api/winbase/nf-winbase-verifyversioninfoa#remarks)). Whatever the reason, removing the [version check](https://github.com/dgriffen/terminal/blob/cfa32c34b5bab09fd011d07c369f9bb18d4c6f1a/src/renderer/dx/CustomTextLayout.cpp#L139) fixes the problem for me. Not that I'm suggesting that's the solution - just confirming what I believe is the source of the problem.
Author
Owner

@fcharlie commented on GitHub (Jul 22, 2019):

If supportedOS is not set in the application manifest, then IsWindows8Point1OrGreater will fail. Currently, conhost does not link any manifest files, and the manifest file in the conhost source directory is not set to supportedOS.

I created a commit to fix the application manifest file, but it has not been tested yet, so I haven't created PR yet: 4c6280ca35

@fcharlie commented on GitHub (Jul 22, 2019): If `supportedOS` is not set in the application manifest, then `IsWindows8Point1OrGreater` will fail. Currently, conhost does not link any manifest files, and the manifest file in the conhost source directory is not set to `supportedOS`. I created a commit to fix the application manifest file, but it has not been tested yet, so I haven't created PR yet: https://github.com/fcharlie/terminal/commit/4c6280ca35fff9eac0041c94385574bedc5f2a27
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 22, 2019):

/cc @dgriffen (just fyi)

@DHowett-MSFT commented on GitHub (Jul 22, 2019): /cc @dgriffen (just fyi)
Author
Owner

@ghost commented on GitHub (Jul 23, 2019):

@DHowett-MSFT I didn't realize that conhost didn't have its own application manifest. Unfortunately there is no good way to test OS version that doesn't rely on the application manifest since Windows will try its best to report an old OS number if you don't have a manifest.

@ghost commented on GitHub (Jul 23, 2019): @DHowett-MSFT I didn't realize that conhost didn't have its own application manifest. Unfortunately there is no good way to test OS version that doesn't rely on the application manifest since Windows will try its best to report an old OS number if you don't have a manifest.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2870