I am trying to include some custom fonts in my project with no success.
NOTE: I am using angular-cli: angular-cli@1.0.0-beta.21
I put the fonts in
For the people arriving here by searching:
Install with npm:
npm install roboto-fontface --save
Add to styles in .angular-cli.json
(apps[0].styles
):
"styles": [
"styles.css",
"../node_modules/roboto-fontface/css/roboto/roboto-fontface.css"
],
That's all!
Edit: since Angular 6 this file is called angular.json
instead of angular-cli.json
. Adding fonts still works the same way as before.