Skip to content

InkHUD Extended ASCII #6768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 22, 2025
Prev Previous commit
Next Next commit
Fix inverted logic
Slipped in during a last minute renaming while tidying up to push..
  • Loading branch information
todd-herbert authored and fifieldt committed May 12, 2025
commit 146cf0eaf6e9f6c6dbc839d09c29a1f1517418df
6 changes: 3 additions & 3 deletions src/graphics/niche/InkHUD/Applet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,18 +350,18 @@ std::string InkHUD::Applet::parseShortName(meshtastic_NodeInfoLite *node)
return nodeID.substr(nodeID.length() - 4);
}

// Determine if a string contains only emoji, without any text
// Determine if all characters of a string are printable using the current font
bool InkHUD::Applet::isPrintable(std::string text)
{
// Scan for DEL (0x7F), which is the value assigned by AppletFont::applyEncoding if a unicode character is not handled
// Todo: move this to from DEL to SUB, once the fonts have been changed for this
for (char &c : text) {
if (c == '\x7F')
return true;
return false;
}

// No unprintable characters found
return false;
return true;
}

// Gets rendered width of a string
Expand Down
Loading