Icon font from fontello not working with Meteor js

后端 未结 3 1947
孤城傲影
孤城傲影 2021-01-22 12:05

I have downloaded a custom icon font from fontello and intend to use it in my meteor app. I tried the demo that comes with the downloaded package and the fonts display fine. He

3条回答
  •  醉酒成梦
    2021-01-22 12:43

    I had the same issue and the way I solved was by using these absolute paths:

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

    Directly on the public/fonts/ directory. I guess that MeteorJS is smart enough to guess the paths.

提交回复
热议问题