We have an internal application that includes a bunch of custom fonticons. The application only works on the latest version of chrome, so we don't need to worry about compatibility issues. In our sass, we have:
@font-face {
font-family: 'fonticons';
src: url('../assets/fonts/fonticons.eot?5066');
src: url('../assets/fonts/fonticons.eot?5066#iefix') format('embedded-opentype'),
url('../assets/fonts/fonticons.woff2?5066') format('woff2'),
url('../assets/fonts/fonticons.woff?5066') format('woff'),
url('../assets/fonts/fonticons.ttf?5066') format('truetype'),
url('../assets/fonts/fonticons.svg?5066#fonticons') format('svg');
font-weight: normal;
font-style: normal;
}
This seems like overkill. I would like to avoid using and creating unnecessary font files. And the following appears to work just as well:
@font-face {
font-family: 'fonticons';
src: url('../assets/fonts/fonticons.woff2?5066') format('woff2');
font-weight: normal;
font-style: normal;
}
If I do this, then I can remove the woff, eot, and ttf files, making the build process simpler and faster. Generating the fonts is not currently automated and that is my goal here. I have two questions:
- Is there any reason not to do this?
- Which version of the fonts should I keep? woff, woff2, ttf, eot?