Public Access
Add a PC renderer for the themed pages; fix overlapping layouts
tools/render_pages.py compiles the page code natively with g++ against ESPHome's own display and font code and the font bitmaps of the last `esphome compile`, and draws pages to PNG at chosen moments with sample data (normal, empty, alert, busy), as a contact sheet, or as one example per page in docs/images/pages (now shown in the README). Fixes found with it: Cyber HUD zone names ran into the temperatures, the breach header label hit the tag and the column marker the matrix label; KonoSuba subtitle, guild weather icon, cabbage text and all-day deadline, and hills through the party; Steins;Gate D-mail recipient, the microwave display, the gadget card value and world line labels; LCARS room rows, readout bars and data cascade, warp core readouts, and the captain's log weather wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13a499fd97
commit
d2e81a5a36
27 files changed
+627
-38
No files matched your search
@@ -96,6 +96,12 @@ inline std::string upper(std::string s) {
|
||||
return s;
|
||||
}
|
||||
|
||||
inline std::string lower(std::string s) {
|
||||
for (auto &c : s)
|
||||
c = (char) tolower((unsigned char) c);
|
||||
return s;
|
||||
}
|
||||
|
||||
inline int text_width(display::Display &it, display::BaseFont *font, const char *text) {
|
||||
int x, y, w, h;
|
||||
it.get_text_bounds(0, 0, text, font, display::TextAlign::TOP_LEFT, &x, &y, &w, &h);
|
||||
|
||||
Reference in new issue
Block a user