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:
@@ -22,7 +22,7 @@ class IconSetTests(unittest.TestCase):
|
||||
wanted = [f'\\U000{code}' for code in tile_icons.GLYPHS.values()]
|
||||
for name in ('home-like-2432s028.yaml', 'guition-4848s040.yaml', 'packages/cyd.yaml', 'packages/guition.yaml'):
|
||||
text = (ROOT / name).read_text()
|
||||
fonts = re.findall(r'materialdesignicons-webfont\.ttf["\']\n id: (\w+)\n size: \d+\n glyphs: (.*)\n', text)
|
||||
fonts = re.findall(r'materialdesignicons-webfont\.ttf["\']\n id: (\w+)\n size: \d+\n bpp: 4\n glyphs: (.*)\n', text)
|
||||
self.assertEqual([font for font, _ in fonts], ['materialdesign_icons', 'materialdesign_icons_mini', 'materialdesign_icons_big', 'watch_icon'], name)
|
||||
self.assertTrue(fonts[0][1].startswith('&tile_icons ') and all(g == '*tile_icons' for font, g in fonts[1:] if font != 'materialdesign_icons_big'), name)
|
||||
block = text.split('glyphs: &tile_icons ', 1)[1].split('\n\n', 1)[0]
|
||||
|
||||
Reference in New Issue
Block a user