Browse Source

True font types has its own non printable characters and we should use them.

BDisp 4 years ago
parent
commit
d8fbd3efb2
1 changed files with 3 additions and 5 deletions
  1. 3 5
      Terminal.Gui/Core/ConsoleDriver.cs

+ 3 - 5
Terminal.Gui/Core/ConsoleDriver.cs

@@ -589,12 +589,10 @@ namespace Terminal.Gui {
 		/// <returns></returns>
 		public static Rune MakePrintable (Rune c)
 		{
-			if (c <= 0x1F) {
-				// ASCII (C0) control characters. 
-				return new Rune (c + 0x2400);
-			} else if (c >= 0x80 && c <= 0x9F) {
+			if (c <= 0x1F || (c >= 0x80 && c <= 0x9F)) {
+				// ASCII (C0) control characters.
 				// C1 control characters (https://www.aivosto.com/articles/control-characters.html#c1)
-				return new Rune (0x25a1); // U+25A1, WHITE SQUARE, □: 
+				return new Rune (c + 0x2400);
 			} else {
 				return c;
 			}