material-dynamic-fonts
v0.0.3
Published
This project is based on https://fonts.google.com/icons.
Maintainers
Readme
Material Dynamic Fonts
This project is based on https://fonts.google.com/icons. This is a microlib to fetch only the icons used in page automatically. No code required. Just drop it in your HTML. The expected result is to reduce the font file to about ~1kb.
Getting Started
CDN
Auto load
You can set automatically the script adding some params as query string. The available params are font and selector. The selector param is optional.
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/material-dynamic-fonts.min.js?font=Material Symbols Outlined"></script>Manual load
The materialDynamicFonts() function has font and selector params. If no params are informed, it will use the Material Symbols Outlined font and the .material-symbols-outlined selector:
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/material-dynamic-fonts.min.js"></script>materialDynamicFonts("Material Symbols Outlined");NPM
npm i material-dynamic-fontsimport "material-dynamic-fonts";materialDynamicFonts("Material Symbols Outlined");