From 3a86cab8d536b2183b657fbdb6fdfd674b24ccc7 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 12 Aug 2023 22:27:37 -0700 Subject: [PATCH] Minor font index bug and comment cleanup --- .../Graphics.MicroGraphics/Driver/Fonts/Font12x16.cs | 2 +- .../Graphics.MicroGraphics/Driver/Fonts/Font4x6.cs | 2 +- .../Graphics.MicroGraphics/Driver/Fonts/Font6x8.cs | 2 +- .../Graphics.MicroGraphics/Driver/Fonts/Font8x16.cs | 2 +- .../Graphics.MicroGraphics/Driver/Fonts/Font8x8.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font12x16.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font12x16.cs index 86aee1a819..a831ca1dd7 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font12x16.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font12x16.cs @@ -131,7 +131,7 @@ public byte[] this[char character] get { var index = (byte)character; - if ((index < 32) || (index > 127)) + if ((index < 32) || (index >= 127)) { return _fontTable[0x20]; } diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font4x6.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font4x6.cs index 5827f548e2..c3a24353cc 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font4x6.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font4x6.cs @@ -114,7 +114,7 @@ public class Font4x6 : IFont new byte[]{0x22, 0x22, 0x22}, //007C(|) new byte[]{0x23, 0x26, 0x03}, //007D(}) new byte[]{0x5A, 0x00, 0x00}, //007E(~) - new byte[]{0x00, 0x00, 0x00}, //00A0( ) + new byte[]{0x00, 0x00, 0x00}, //007F( ) }; diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font6x8.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font6x8.cs index b08e97a043..707f8a0c8f 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font6x8.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font6x8.cs @@ -131,7 +131,7 @@ public byte[] this[char character] get { var index = (byte)character; - if ((index < 32) || (index > 127)) + if ((index < 32) || (index >= 127)) { return _fontTable[0x20]; } diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x16.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x16.cs index 053d7062ba..a9cc9e9f07 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x16.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x16.cs @@ -115,7 +115,7 @@ public class Font8x16 : IFont new byte[] {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00}, //007C(|) new byte[] {0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00, 0x00, 0x00}, //007D(}) new byte[] {0x26, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //007E(~) - new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //00A0( ) + new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //007F( ) }; /// diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x8.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x8.cs index 37bc1390ff..3a2f101d76 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x8.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Fonts/Font8x8.cs @@ -115,7 +115,7 @@ public class Font8x8 : IFont new byte[] { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00 }, // U+007C (|) new byte[] { 0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00 }, // U+007D (}) new byte[] { 0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+007E (~) - new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } // U+007F + new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } // U+007F }; ///