Skip to content

Commit 2febe1f

Browse files
j4jamesDHowett
authored andcommitted
Fix a couple of the DEC Special Graphics characters (microsoft#2081)
* Map the code point 0x5F to a blank glyph in the Special Graphics character set. * Map code point 0x60 in the Special Graphics character set to the Unicode "black diamond suite", rather than the "black diamond", since the latter is currently rendered as a double width glyph. * Correct a couple of the comments on the Special Graphics translation table to match the DEC documentation. * Make hex values consistently lowercase for the Unicode characters in the Special Graphics translation table.
1 parent 89190c6 commit 2febe1f

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

src/terminal/adapter/terminalOutput.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,38 +83,38 @@ const wchar_t TerminalOutput::s_rgDECSpecialGraphicsTranslations[s_uiNumDisplayC
8383
L'\x5c',
8484
L'\x5d',
8585
L'\x5e',
86-
L'\x5f',
87-
L'\u25C6', // L'\x60', -> Diamond
86+
L'\u0020', // L'\x5f', -> Blank
87+
L'\u2666', // L'\x60', -> Diamond (more commonly U+25C6, but U+2666 renders better for us)
8888
L'\u2592', // L'\x61', -> Checkerboard
8989
L'\u2409', // L'\x62', -> HT, SYMBOL FOR HORIZONTAL TABULATION
9090
L'\u240c', // L'\x63', -> FF, SYMBOL FOR FORM FEED
9191
L'\u240d', // L'\x64', -> CR, SYMBOL FOR CARRIAGE RETURN
9292
L'\u240a', // L'\x65', -> LF, SYMBOL FOR LINE FEED
93-
L'\u00B0', // L'\x66', -> Degree symbol
94-
L'\u00B1', // L'\x67', -> Plus/minus
93+
L'\u00b0', // L'\x66', -> Degree symbol
94+
L'\u00b1', // L'\x67', -> Plus/minus
9595
L'\u2424', // L'\x68', -> NL, SYMBOL FOR NEWLINE
9696
L'\u240b', // L'\x69', -> VT, SYMBOL FOR VERTICAL TABULATION
9797
L'\u2518', // L'\x6a', -> Lower-right corner
9898
L'\u2510', // L'\x6b', -> Upper-right corner
9999
L'\u250c', // L'\x6c', -> Upper-left corner
100100
L'\u2514', // L'\x6d', -> Lower-left corner
101-
L'\u253C', // L'\x6e', -> crossing lines
102-
L'\u23ba', // L'\x6f', -> HORIZONTAL SCAN LINE-3
103-
L'\u23bb', // L'\x70', -> HORIZONTAL SCAN LINE-3
104-
L'\u2500', // L'\x71', -> HORIZONTAL SCAN LINE-5
105-
L'\u23bc', // L'\x72', -> HORIZONTAL SCAN LINE-7
106-
L'\u23bd', // L'\x73', -> HORIZONTAL SCAN LINE-7
101+
L'\u253c', // L'\x6e', -> Crossing lines
102+
L'\u23ba', // L'\x6f', -> Horizontal line - Scan 1
103+
L'\u23bb', // L'\x70', -> Horizontal line - Scan 3
104+
L'\u2500', // L'\x71', -> Horizontal line - Scan 5
105+
L'\u23bc', // L'\x72', -> Horizontal line - Scan 7
106+
L'\u23bd', // L'\x73', -> Horizontal line - Scan 9
107107
L'\u251c', // L'\x74', -> Left "T"
108108
L'\u2524', // L'\x75', -> Right "T"
109109
L'\u2534', // L'\x76', -> Bottom "T"
110110
L'\u252c', // L'\x77', -> Top "T"
111111
L'\u2502', // L'\x78', -> | Vertical bar
112112
L'\u2264', // L'\x79', -> Less than or equal to
113113
L'\u2265', // L'\x7a', -> Greater than or equal to
114-
L'\u03C0', // L'\x7b', -> Pi
114+
L'\u03c0', // L'\x7b', -> Pi
115115
L'\u2260', // L'\x7c', -> Not equal to
116-
L'\u00A3', // L'\x7d', -> UK pound sign
117-
L'\u00B7', // L'\x7e', -> Centered dot
116+
L'\u00a3', // L'\x7d', -> UK pound sign
117+
L'\u00b7', // L'\x7e', -> Centered dot
118118
L'\x7f' // L'\x7f', -> DEL
119119
};
120120

@@ -157,7 +157,7 @@ wchar_t TerminalOutput::TranslateKey(const wchar_t wch) const
157157
{
158158
wchar_t wchFound = wch;
159159
if (_wchCurrentCharset == DispatchTypes::VTCharacterSets::USASCII ||
160-
wch < '\x60' || wch > '\x7f') // filter out the region we know is unchanged
160+
wch < '\x5f' || wch > '\x7f') // filter out the region we know is unchanged
161161
{
162162
; // do nothing, these are the same as default.
163163
}

0 commit comments

Comments
 (0)