This is NOT
a fork of the material design icons by Google, including only the font files for smaller distribution.
This is a generator script which fetches the iconfont from the original material design icons repo, converts otf
fonts to woff
, and makes it possible to use the self-hosted version of the latest material design icons for web.
Clone the repo, cd
into the project directory and execute from root
$ bash src/generate-iconfont.sh
Fonts will be generated in the ./iconfont
directory relative to the project root.
Material design icons are the official icon set from Google that are designed under the material design guidelines.
Read the developer guide on how to use the material design icons in your project.
The iconfont
folder contains pre-generated font files that can be included in a project. This is especially convenient for the web. However, it is generally better to link to the web font hosted on Google Fonts:
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
Install the package. Exexute
npm i --save-dev material-design-icon-fonts-self-hosted-web
or
yarn add -D material-design-icon-fonts-self-hosted-web
Add one of the folowing css
files to the styles
array of a corresponding app in angular.json
depending on which version of the icons are intended to be used in the app.
"styles": [
"node_modules/material-design-icon-fonts-self-hosted-web/iconfont/material-icons.css"
],
"styles": [
"node_modules/material-design-icon-fonts-self-hosted-web/iconfont/material-icons-outlined.css"
],
"styles": [
"node_modules/material-design-icon-fonts-self-hosted-web/iconfont/material-icons-round.css"
],
"styles": [
"node_modules/material-design-icon-fonts-self-hosted-web/iconfont/material-icons-sharp.css"
],
"styles": [
"node_modules/material-design-icon-fonts-self-hosted-web/iconfont/material-icons-twotone.css"
],