commit 6ea1ab29c14da9fe277c6c295e0a3208a3fd44e5
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Sun Jan 15 16:18:23 2023 -0700
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Sun Jan 15 16:18:23 2023 -0700
fix char width after one off char
---
source/printHelper.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/source/printHelper.cpp b/source/printHelper.cpp
index b147ab7..2ea38b8 100644
--- a/source/printHelper.cpp
+++ b/source/printHelper.cpp
@@ -273,7 +273,6 @@ int print(std::string str, int x, int y, uint8_t c) {
printMode |= PRINT_MODE_SOLID_BG;
}
else if (commandChar == ':' || commandChar == '.'){
- charWidth = forceCharWidth > 0 ? forceCharWidth : 8;
charHeight = forceCharHeight > 0 ? forceCharHeight : 8;
if (commandChar == ':') {
std::string hexStr = str.substr(n+1, 16);
@@ -296,10 +295,10 @@ int print(std::string str, int x, int y, uint8_t c) {
prevDrawPal[fgColor & 0x0f],
bgColor,
printMode,
- charWidth,
+ 8,
charHeight);
- x += charWidth + get<0>(values);
+ x += 8 + get<0>(values);
charHeight = charHeight + get<1>(values);
lineHeight = charHeight > lineHeight ? charHeight : lineHeight;
}