FontAwesome fails to load fonts locally and in electron app

前端 未结 8 1451
野的像风
野的像风 2020-12-14 15:09

I have downloaded FontAwesome using npm and then copied the css-file and the fonts into the right folders in the root-diretory of my electron-application using grunts copy t

8条回答
  •  抹茶落季
    2020-12-14 15:30

    If you are using the bower you could rewrite your font-face to:

    @font-face {
      font-family: FontAwesome;
      src: url(font-awesome/fonts/fontawesome-webfont.eot);
      src: url(font-awesome/fonts/fontawesome-webfont.eot?#iefix) format('embedded-opentype'), 
           url(font-awesome/fonts/fontawesome-webfont.woff) format('woff'), 
           url(font-awesome/fonts/fontawesome-webfont.ttf) format('truetype'), 
           url(font-awesome/fonts/fontawesome-webfont.svg#fontawesomeregular) format('svg');
      font-weight: 400;
      font-style: normal
    }
    

提交回复
热议问题