rprichard / winpty

A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.
MIT License
1.3k stars 167 forks source link

Custom font under DBCS codepages #84

Open be5invis opened 8 years ago

be5invis commented 8 years ago

I’ve made a font called Inziu and I use them under cp 932/936/950. I sync my font settings with VSCode. Hosever winpty cannot select them for the hidden console window, causes some characters’ width incorrectly measured. related: Microsoft/vscode#7355

rprichard commented 8 years ago

Adding some way to configure the winpty font seems like a plausible way to fix half-width vs full-width mismatches.

I wonder if SetCurrentConsoleFontEx is still restricted to the set of console fonts registered in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont? IIRC, some of the newer Windows 10 builds (14342?) have also been changing the console font selection stuff, so it might be a good idea to test them.

Ideally, winpty would "just work" somehow, but maybe that's impractical given characters that can legitimately be rendered as either half-width or full-width.

Note to self: https://codepoints.net/U+XXXX shows the East Asian Width property.