[GH-ISSUE #147] A lot of “white squares” could be printed with unset vars #1174

Closed
opened 2026-03-20 19:05:24 +01:00 by sascha_hemi · 2 comments
Owner

Originally created by @svenove on GitHub (Oct 15, 2023).
Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/147

Describe the bug
When using JSON-templates with variables, the variable name is printed if it has no assigned value. If using large fonts, they don’t contain the letters needed to print the variable name. This causes the "Unicode white boxes" to be printed.

To Reproduce
Steps to reproduce the behavior:

  1. Use a JSON-template with '{my_var}' in font 'calibrib80'.
  2. Don’t set the variable to a value.
  3. See the tag print white squares.

Expected behavior
Either nothing should be printed instead of the variable, or a char like '?', '-', or similar.

Screenshots
IMG_4656

Additional context
I might try fixing this myself and adding it to a PR.

Originally created by @svenove on GitHub (Oct 15, 2023). Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/147 **Describe the bug** When using JSON-templates with variables, the variable name is printed if it has no assigned value. If using large fonts, they don’t contain the letters needed to print the variable name. This causes the "Unicode white boxes" to be printed. **To Reproduce** Steps to reproduce the behavior: 1. Use a JSON-template with '{my_var}' in font 'calibrib80'. 2. Don’t set the variable to a value. 3. See the tag print white squares. **Expected behavior** Either nothing should be printed instead of the variable, or a char like '?', '-', or similar. **Screenshots** ![IMG_4656](https://github.com/jjwbruijn/OpenEPaperLink/assets/4579212/6d8a0e40-5afa-49db-abb7-6693500b6fe8) **Additional context** I might try fixing this myself and adding it to a PR.
sascha_hemi added the bug label 2026-03-20 19:05:24 +01:00
Author
Owner

@nlimper commented on GitHub (Oct 15, 2023):

Thanks for the report.
I will replace a non-existing variable by an empty string to avoid the uglyness. I cannot assume that a '?' character is present in the font. The fix shows up in the next upcoming commit.
And, if you apply a json template containing a variable, you should make sure that you also fill the variable anyway ;-)

<!-- gh-comment-id:1763464229 --> @nlimper commented on GitHub (Oct 15, 2023): Thanks for the report. I will replace a non-existing variable by an empty string to avoid the uglyness. I cannot assume that a '?' character is present in the font. The fix shows up in the next upcoming commit. And, if you apply a json template containing a variable, you should make sure that you also fill the variable anyway ;-)
Author
Owner

@svenove commented on GitHub (Oct 15, 2023):

Wow, you’re quick!

Yeah, '?' Would require adding it to all the fonts. That’s why I thought about '-', since that was just added in all of them to support negative numbers? If a custom font is used that doesn’t have '-', it would result in a single white box.

Some variables are set just daily. After a reboot of the AP that would give boxes for quite a while until the var is set. ;)

<!-- gh-comment-id:1763474869 --> @svenove commented on GitHub (Oct 15, 2023): Wow, you’re quick! Yeah, '?' Would require adding it to all the fonts. That’s why I thought about '-', since that was just added in all of them to support negative numbers? If a custom font is used that doesn’t have '-', it would result in a single white box. Some variables are set just daily. After a reboot of the AP that would give boxes for quite a while until the var is set. ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/OpenEPaperLink#1174