angular2-cli include custom fonts

前端 未结 5 1249
悲&欢浪女
悲&欢浪女 2020-12-25 11:25

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

  1. I put the fonts in

5条回答
  •  青春惊慌失措
    2020-12-25 12:16

    If using SCSS you can:

    Install roboto-fontface

    npm install roboto-fontface --save
    

    Import on your styles.scss file

    @import '~roboto-fontface/css/roboto/roboto-fontface.css';
    
    body {
      font-family: Roboto, Helvetica, Arial, sans-serif;
    }
    

提交回复
热议问题