Skip to content

Commit

Permalink
remove special chars for 7seg font
Browse files Browse the repository at this point in the history
  • Loading branch information
Freubert authored Sep 27, 2024
1 parent 2834c72 commit f3db296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/lcdclockplus/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let clockInfoDraw = (itm, info, options) => {
if (info.img) {
g.drawImage(info.img, options.x+1,options.y+2);
}
var text = info.text.toString().toUpperCase();
var text = info.text.toString().toUpperCase().replace(/[^A-Z0-9]/g, "");
if (g.setFont("7Seg:2").stringWidth(text)+24-2>options.w) g.setFont("7Seg");
g.setFontAlign(0,-1).drawString(text, options.x+options.w/2+13, options.y+6);
};
Expand Down

0 comments on commit f3db296

Please sign in to comment.