I want to self host Material Design Icon Fonts. I have followed their developer guide. So I downloaded the icon font from here, coppied the eot
, ttf
, woff
and woff2
files into my project directory and included it in my CSS. But I am getting a ton of errors:
The question is why and how do I fix it. SSCCE follows:
/* fallback */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url('fonts/material/MaterialIcons-Regular.eot');
/* For IE6-8 */
src: local('Material Icons'), local('MaterialIcons-Regular'), url('fonts/material/MaterialIcons-Regular.woff2') format('woff2'), url('fonts/material/MaterialIcons-Regular.woff') format('woff'), url('fonts/material/MaterialIcons-Regular.ttf') format('truetype');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
/* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="styles.css" />
<link type="text/css" rel="stylesheet" href="material.min.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="material.min.js"></script>
</head>
<body>
<button class="mdl-button mdl-js-button"><i class="material-icons">chevron_left</i>
</button>
</body>
</html>
The question is why and how to fix this?
My Project Hierarchy: