[Angular] Migrate from the Material Icons font to Material Symbols #1170

Closed
opened 2026-10-02 04:44:19 +00:00 by spikerj · 1 comment
Owner

Why

Google's legacy Material Icons font is deprecated in favour of Material Symbols (variable font: weight/fill/grade/optical size, far larger icon set, still maintained). Angular Material 22.2 mat-icon now detects Material Symbols ligatures and applies the right classes (angular/components#33750), so the switch no longer needs per-icon fontSet plumbing.

What changes for us

  • Self-hosted font: projects/spikersoft/src/assets/fonts/material-icons/material-icons.css (+ the font files) → self-host Material Symbols (Outlined/Rounded — pick one to match the glass theme) and set MatIconRegistry.setDefaultFontSetClass(...) at bootstrap.
  • 454 files use <mat-icon>; a handful of ligature names differ between the sets — script a check of all used ligature names against the Symbols codepoints list.
  • contact.component.ts uses MatIconRegistry directly — review.
  • Re-check the ngsw asset groups / offline cache include the new font.

Acceptance criteria

  • one icon font shipped (old font removed)
  • every used ligature renders (scripted check + visual pass of nav, dashboards, playgrounds)
  • bundle/asset size noted in the PR

Size: M. Best after the Angular 22.2 upgrade.

Links: Best after #1165.


Filed from the 2026-10-02 spikersoft-angular pnpm outdated changelog review.

## Why Google's legacy **Material Icons** font is deprecated in favour of **Material Symbols** (variable font: weight/fill/grade/optical size, far larger icon set, still maintained). Angular Material 22.2 `mat-icon` now detects Material Symbols ligatures and applies the right classes (angular/components#33750), so the switch no longer needs per-icon `fontSet` plumbing. ## What changes for us - Self-hosted font: `projects/spikersoft/src/assets/fonts/material-icons/material-icons.css` (+ the font files) → self-host Material Symbols (Outlined/Rounded — pick one to match the glass theme) and set `MatIconRegistry.setDefaultFontSetClass(...)` at bootstrap. - 454 files use `<mat-icon>`; a handful of ligature names differ between the sets — script a check of all used ligature names against the Symbols codepoints list. - `contact.component.ts` uses `MatIconRegistry` directly — review. - Re-check the ngsw asset groups / offline cache include the new font. ## Acceptance criteria - [ ] one icon font shipped (old font removed) - [ ] every used ligature renders (scripted check + visual pass of nav, dashboards, playgrounds) - [ ] bundle/asset size noted in the PR Size: **M**. Best after the Angular 22.2 upgrade. **Links:** Best after #1165. --- _Filed from the 2026-10-02 spikersoft-angular `pnpm outdated` changelog review._
spikerj added the enhancement label 2026-10-02 04:44:19 +00:00
Author
Owner

Already done: shipped in spikersoft-angular #1420 (merged 2026-10-02, commit 101d5458f), ahead of the Angular 22.2 upgrade (#1165).

Checked against origin/master:

  • The old assets/fonts/material-icons/ font and CSS are gone. A self-hosted Material Symbols Outlined font (assets/fonts/material-symbols/) and material-symbols.provider.ts replace them.
  • Ligature check: scripts/check-material-symbols.cjs runs as a CI gate ("Material Symbols ligature gate (#1170)" in main.yml).
  • contact.component.ts was reviewed: brand logos now use svgIcon instead of ligatures.
  • The service worker caches the new font through the /assets/** asset group.

Closing. Reopen if any icon still renders as plain text after deploy.

Already done: shipped in spikersoft-angular #1420 (merged 2026-10-02, commit 101d5458f), ahead of the Angular 22.2 upgrade (#1165). Checked against `origin/master`: - The old `assets/fonts/material-icons/` font and CSS are gone. A self-hosted Material Symbols Outlined font (`assets/fonts/material-symbols/`) and `material-symbols.provider.ts` replace them. - Ligature check: `scripts/check-material-symbols.cjs` runs as a CI gate ("Material Symbols ligature gate (#1170)" in `main.yml`). - `contact.component.ts` was reviewed: brand logos now use `svgIcon` instead of ligatures. - The service worker caches the new font through the `/assets/**` asset group. Closing. Reopen if any icon still renders as plain text after deploy.
Sign in to join this conversation.