Skip to content

Commit

Permalink
Minor font index bug and comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Aug 13, 2023
1 parent 7147de5 commit 3a86cab
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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( )
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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( )
};

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/// <summary>
Expand Down

0 comments on commit 3a86cab

Please sign in to comment.