Draw the 67 Material Symbols Google ships without a viewBox at every size

Google publishes 67 symbols per cut (auto_awesome, insights,
tips_and_updates, battery_50 ...) with width and height but no viewBox,
their paths in 24 units, or 20 in the 20 cut, where every other symbol
draws in `0 -960 960 960`. bin/fetch-symbols dropped the size so CSS
decides it, which left these with no coordinate system: `<x-icon>`
drew them at 1:1, whole only at exactly 24px and cut off or misplaced
at any other size, the 20 cut every small button uses included.
normalise() now turns a file's width and height into its viewBox when
it has none, before dropping them. The 268 files are regenerated from
Google's originals at the recorded SOURCE commit with the fixed step
(each shipped file matched the old step's output first; the other
16,272 do not change), and every path lies inside its new viewBox.
IconTest checks that each shipped symbol has a viewBox and that
`<x-icon name="auto_awesome">` renders in 20 units at size 16 and in 24
at size 32; both fail without the change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andreas Reinhold / reini
2026-09-17 04:18:10 +02:00
co-authored by Claude Opus 5
parent b7e16476cd
commit 7a95449c82
271 changed files with 296 additions and 270 deletions
+5
View File
@@ -23,6 +23,11 @@
dropped the fill without saying so. Hover, focus and press now tint the fill instead of hiding
it. In `<x-table>` a plain row takes `data-md-selected` too, beside `aria-selected="true"`. A
card still takes no selected fill.
- **67 Material Symbols** in each cut (`auto_awesome`, `insights`, `tips_and_updates`,
`battery_50` …) are drawn whole at every size. Google publishes them in 24 units (20 in the 20
cut) with a width and height but no viewBox, and the package dropped the size, so they fitted
only at exactly 24px and were cut off or misplaced at any other — the 20 cut every small button
draws from included. Nothing to change.
## From 2.0.0 to 2.1.0