Using @font-face with Rails 3.1 app?

前端 未结 7 1823
青春惊慌失措
青春惊慌失措 2020-12-02 08:23

I\'m having trouble using the following @font-face declaration to work with my Rails 3.1 app. I put the fonts in the Asset Pipeline in its own folder called \"

7条回答
  •  孤街浪徒
    2020-12-02 09:10

    I just updated that article on Atomic Object's Spin blog. Here is the CSS converted (You were looking at the Sass syntax)

    @font-face {
      font-family: "Merriweather";
      src: url(/assets/merriweather-black-webfont.eot);
      src: local("Merriweather Heavy"), local("Merriweather-Heavy"), url(/assets/merriweather-black-webfont.eot?#iefix) format("embedded-opentype"), url(/assets/merriweather-black-webfont.woff) format("woff"), url(/assets/merriweather-black-webfont.ttf) format("truetype"), url(/assets/merriweather-black-webfont.svg#MerriweatherHeavy) format("svg");
      font-weight: 900;
      font-style: normal;
    }
    

提交回复
热议问题