-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Description
Description of the new feature/enhancement
Starting with the VT220 terminal, it was possible for apps to define their own "soft fonts", also known as dynamically replaceable character sets (DRCS). You would download the font to the terminal with a DECDLD escape sequence, and assign it a character set ID that could then be designated via the usual SCS escape sequences.
Some example use cases:
Custom fonts

More examples at https://vt100.net/dec/vt320/fonts
CMatrix with Japanese characters
Proposed technical implementation details (optional)
The screenshots above were taken from a POC I've been working on for conhost. In the current implemenation, when you've designated a DRCS character set, those characters get mapped to values in the Unicode PUA area. Then when the renderer encounters values in that range, it uses a BitBlt to render the glyph in place of the usual PolyTextOut calls.
The quality isn't fantastic - I'm just using StretchBlt to resize the provided glyphs to match the current font size. And the performance can seem a bit sluggish on apps like CMatrix when writing a lot of content to the screen. Nevertheless, I think it works reasonably well, and I'm sure someone smarter than me will have suggestions for how it could be improved.
I'm still a long way from producing a PR, but I wanted to raise the issue now to see how much interest there was in the idea before spending too much time on it. Initially it would be conhost-only - I'm not sure about the conpty feasibility without #1173.


