Draw the icons with sixteen shades: the power ring on the CYD is a ring again (0.2.75)

The Material Design Icons fonts of both boards had no bpp, so ESPHome rendered them at
its default of one bit per pixel while the text fonts already had four. On the CYD, at
18 and 28 px, a thin stroke such as the ring of mdi:power came out lumpy and uneven, and
every other icon had a ragged edge. All four icon fonts of both profiles now say bpp: 4;
the icon generator and its test keep that line. Costs the CYD 95 KB of flash (90 % of
the update slot in use on top of 0.2.74), no RAM.

App 0.2.75, firmware 0.2.63. Test results in docs/TEST_RESULTS_0275.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-18 08:48:31 +02:00
parent bb25353089
commit 261fa82c7d
10 changed files with 89 additions and 8 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ PROFILES = [ROOT / 'home-like-2432s028.yaml', ROOT / 'guition-4848s040.yaml']
WEB_FONT = ROOT / 'web/src/assets/tile-icons.woff'
BAR_FONTS = {weight: ROOT / f'web/src/assets/bar-roboto-{weight}.woff' for weight in (400, 500)}
NAME_TABLE = ROOT / 'components/smart_display/tile_icon_names.h'
FONT_BLOCK = re.compile(r"( - file: 'fonts/materialdesignicons-webfont\.ttf'\n id: \w+\n size: \d+\n) glyphs:.*\n(?: .*\n)*")
# Four bits per pixel: the default of one draws a thin ring like mdi:power as a lumpy circle on the CYD.
FONT_BLOCK = re.compile(r"( - file: 'fonts/materialdesignicons-webfont\.ttf'\n id: \w+\n size: \d+\n bpp: 4\n) glyphs:.*\n(?: .*\n)*")
def verify():
"""Names and codepoints must match the TTF the firmware is built from."""