[PR #13362] Add support for soft fonts in the DX renderer #29515

Closed
opened 2026-01-31 09:35:22 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/13362

State: closed
Merged: Yes


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
  • 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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13362 **State:** closed **Merged:** Yes --- ## 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.
claunia added the pull-request label 2026-01-31 09:35:22 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29515