this is just an extention/improvement to @z.bagley's answer https://stackoverflow.com/a/50360119/16448199
replacing in index.html the old line with this extended one worked like a charm:
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp" rel="stylesheet">
Improved
just realized after that, you can do that with the material-symbols too!
which has more format varities (except: no twotone) and has more icons to choose.
they look more logic with only 3 font-families to choose:
- rounded
- outline (which should have called 'normal')
- and sharp
and further with the attribute "fill" to choose between filled or outlined.
but instead of
https://fonts.googleapis.com/css?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,300,1,0|Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,400,1,0|Material+Symbols+Sharp:opsz,wght,FILL,GRAD@48,400,1,0
you have to use your own css, cause google css generator link is messing something up and doesnt support all variations together. this way you can even go step further and self host the fonts.
i prepared a small example: https://jsfiddle.net/apnft/tz9wugd8/
or check it here directly:
.material-icons, .material-icons-outlined, .material-icons-round,
.material-icons-sharp, .material-icons-two-tone {
font-size: 48px !important;
}
@font-face {
font-family: 'Material Symbols Outlined';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v39/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOej.woff2) format('woff2');
}
@font-face {
font-family: 'Material Symbols Rounded';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolsrounded/v38/syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDB_Qb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOcbTCVpeRL2w5rwZu2rIelXxc.woff2) format('woff2');
}
@font-face {
font-family: 'Material Symbols Sharp';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolssharp/v38/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H5OdzEL3sVTgJtfbYxOLojCL.woff2) format('woff2');
}
@font-face {
font-family: 'Material Symbols Outlined _Filled';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v39/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzazHD_dY43zj-jCxv3fzvRNU22ZXGJpEpjC_1n-q_4MrImHCIJIZrDCvHOej.woff2) format('woff2');
}
@font-face {
font-family: 'Material Symbols Rounded _Filled';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolsrounded/v38/syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDJ_vb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOc7TOVpeRL2w5rwZu2rIelXxc.woff2) format('woff2');
}
@font-face {
font-family: 'Material Symbols Sharp _Filled';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialsymbolssharp/v38/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReYU3rHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-HxOezEL3sVTgJtfbYxOLojCL.woff2) format('woff2');
}
.material-symbols-outlined, .material-symbols-rounded, .material-symbols-sharp,
.material-symbols-outlined-filled, .material-symbols-rounded-filled, .material-symbols-sharp-filled {
font-weight: normal;
font-style: normal;
font-size: 48px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-moz-font-feature-settings: 'liga';
-moz-osx-font-smoothing: grayscale;
}
.material-symbols-outlined {
font-family: 'Material Symbols Outlined';
}
.material-symbols-rounded {
font-family: 'Material Symbols Rounded';
}
.material-symbols-sharp {
font-family: 'Material Symbols Sharp';
}
.material-symbols-outlined-filled {
font-family: 'Material Symbols Outlined _Filled';
}
.material-symbols-rounded-filled {
font-family: 'Material Symbols Rounded _Filled';
}
.material-symbols-sharp-filled {
font-family: 'Material Symbols Sharp _Filled';
}
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp" rel="stylesheet">
icons<br>normal/outlined/round/sharp/twotone
<br>
<mat-icon class="material-icons">home</mat-icon>
<mat-icon class="material-icons-outlined">home</mat-icon>
<mat-icon class="material-icons-round">home</mat-icon>
<mat-icon class="material-icons-sharp">home</mat-icon>
<mat-icon class="material-icons-two-tone">home</mat-icon>
<br>
<mat-icon class="material-icons">account_circle</mat-icon>
<mat-icon class="material-icons-outlined">account_circle</mat-icon>
<mat-icon class="material-icons-round">account_circle</mat-icon>
<mat-icon class="material-icons-sharp">account_circle</mat-icon>
<mat-icon class="material-icons-two-tone">account_circle</mat-icon>
<br>
<mat-icon class="material-icons">adf_scanner</mat-icon>
<mat-icon class="material-icons-outlined">adf_scanner</mat-icon>
<mat-icon class="material-icons-round">adf_scanner</mat-icon>
<mat-icon class="material-icons-sharp">adf_scanner</mat-icon>
<mat-icon class="material-icons-two-tone">adf_scanner</mat-icon>
<br>
symbols<br>outlined/+filled /rounded/+filled /sharp/+filled
<br>
<mat-icon class="material-symbols-outlined">home</mat-icon>
<mat-icon class="material-symbols-outlined-filled">home</mat-icon>
<mat-icon class="material-symbols-rounded">home</mat-icon>
<mat-icon class="material-symbols-rounded-filled">home</mat-icon>
<mat-icon class="material-symbols-sharp">home</mat-icon>
<mat-icon class="material-symbols-sharp-filled">home</mat-icon>
<br>
<mat-icon class="material-symbols-outlined">account_circle</mat-icon>
<mat-icon class="material-symbols-outlined-filled">account_circle</mat-icon>
<mat-icon class="material-symbols-rounded">account_circle</mat-icon>
<mat-icon class="material-symbols-rounded-filled">account_circle</mat-icon>
<mat-icon class="material-symbols-sharp">account_circle</mat-icon>
<mat-icon class="material-symbols-sharp-filled">account_circle</mat-icon>
<br>
<mat-icon class="material-symbols-outlined">adf_scanner</mat-icon>
<mat-icon class="material-symbols-outlined-filled">adf_scanner</mat-icon>
<mat-icon class="material-symbols-rounded">adf_scanner</mat-icon>
<mat-icon class="material-symbols-rounded-filled">adf_scanner</mat-icon>
<mat-icon class="material-symbols-sharp">adf_scanner</mat-icon>
<mat-icon class="material-symbols-sharp-filled">adf_scanner</mat-icon>