-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for soft fonts in the DX renderer (#13362)
## Summary of the Pull Request This PR adds support for downloadable soft fonts in the DirectX renderer, potentially enabling them to be used in Windows Terminal. ## References Soft fonts were first implemented in conhost (with the GDI renderer) in PR #10011. ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments The way the DirectX implementation works is by building up a bitmap containing all of the glyphs, and then drawing an appropriate subsection of that bitmap for each character that needs to be rendered. The current text color is applied with a color matrix effect, and the glyphs are automatically scaled up to the current font size with a scaling effect. By default the scaling uses a high quality cubic interpolation, which gives it a smoother antialiased effect. But if the *Text antialiasing* option is configured as *Aliased*, we use a simpler nearest-neighbor interpolation, which more closely matches the rendering of the original GDI implementation. ## Validation Steps Performed I've manually tested the renderer in conhost with the `UseDx` registry entry. I've also tested in Windows Terminal using the experimental passthrough mode.
- Loading branch information
Showing
10 changed files
with
383 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -292,6 +292,7 @@ codeproject | |
coinit | ||
COLLECTIONURI | ||
colorizing | ||
COLORMATRIX | ||
colororacle | ||
colorref | ||
colorscheme | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.