diff --git a/components/el512/steins.cpp b/components/el512/steins.cpp index 7301cea..3b2a93f 100644 --- a/components/el512/steins.cpp +++ b/components/el512/steins.cpp @@ -98,7 +98,8 @@ constexpr int WORLD_LINE_COUNT = sizeof(WORLD_LINES) / sizeof(WORLD_LINES[0]); // One Nixie tube: glass outline, anode mesh, socket, and the lit digit. void tube(Display &it, const Fonts &f, int x, int y, char digit) { - constexpr int TW = 56, TH = 176, R = 28; + // Odd width so the dome (radius R, 2R + 1 pixels across) meets both walls. + constexpr int TW = 57, TH = 176, R = 28; const int cx = x + TW / 2; arc(it, cx, y + R, R, -90, 90); it.vertical_line(x, y + R, TH - R - 14); @@ -111,9 +112,12 @@ void tube(Display &it, const Fonts &f, int x, int y, char digit) { it.draw_pixel_at(mx, my); if (digit != ' ') { const char s[2] = {digit, 0}; - // Twice, one pixel apart, so the thin filament reads as glowing. + // Twice, one pixel apart, so the thin filament reads as glowing; kept + // inside the glass. + it.start_clipping(x + 2, y + 2, x + TW - 2, y + TH - 14); it.print(cx, y + TH / 2 - 8, f.nixie, TextAlign::CENTER, s); it.print(cx + 1, y + TH / 2 - 8, f.nixie, TextAlign::CENTER, s); + it.end_clipping(); } } diff --git a/docs/images/pages/sg_meter.png b/docs/images/pages/sg_meter.png index 69b2232..afd94ae 100644 Binary files a/docs/images/pages/sg_meter.png and b/docs/images/pages/sg_meter.png differ diff --git a/esphome/el512-panel.yaml b/esphome/el512-panel.yaml index f1e3380..2bab2e8 100644 --- a/esphome/el512-panel.yaml +++ b/esphome/el512-panel.yaml @@ -207,7 +207,7 @@ font: # Steins;Gate pages (also use f_cp_mono, f_cp_code and f_ks_pixel) - file: "gfonts://Nixie One" id: f_sg_nixie - size: 110 + size: 90 glyphs: "0123456789." - file: "gfonts://Special Elite" id: f_sg_title