From 633fee5dd8cd2af07c7fd11bec8215a694b6dda2 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 18 Aug 2023 11:28:59 +0800 Subject: [PATCH] Explain font replacement on public API --- projects/natural/src/lib/modules/icon/icon.module.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/natural/src/lib/modules/icon/icon.module.ts b/projects/natural/src/lib/modules/icon/icon.module.ts index 145256b2..fb90b4b2 100644 --- a/projects/natural/src/lib/modules/icon/icon.module.ts +++ b/projects/natural/src/lib/modules/icon/icon.module.ts @@ -3,7 +3,10 @@ import {MatIconRegistry} from '@angular/material/icon'; import {NATURAL_ICONS_CONFIG, NaturalIconsConfig} from './icon.directive'; /** - * Configure Material Symbols, instead of Material Icons, and configure custom Natural icons + * Configure Material Symbols, instead of Material Icons, and configure custom Natural icons. + * + * This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be + * replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1`. */ export function provideIcons(config: NaturalIconsConfig): Provider[] { return [ @@ -18,8 +21,6 @@ export function provideIcons(config: NaturalIconsConfig): Provider[] { const iconRegistry = inject(MatIconRegistry); return () => { // Replace the old Material Icons by the new Material Symbols - // This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be - // replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1` const defaultFontSetClasses = iconRegistry.getDefaultFontSetClass(); const outlinedFontSetClasses = defaultFontSetClasses .filter(fontSetClass => fontSetClass !== 'material-icons')