为什么我的TypeKit字体不显示?

时间:2014-02-21 18:53:17

标签: css ruby-on-rails fonts ruby-on-rails-4 typekit

我在TypeKit中使用的字体称为“museo”。它似乎没有加载或显示在我的实时网站上。

我已将这两行添加到我的application.html.erb

  <script type="text/javascript" src="//use.typekit.net/ayn8han.js"></script>
    <script type="text/javascript">try{Typekit.load();}catch(e){}</script>

我的CSS:

@font-face {
  font-family: "museo",'ProximaNovaRegular',serif;
  src: url("<%= font_path('proximanova-regular-webfont.eot') %>");
  src: url("<%= font_path('proximanova-regular-webfont.eot') %>") format('embedded-opentype'),
  url("<%= font_path('proximanova-regular-webfont.woff') %>") format('woff'),
  url("<%= font_path('proximanova-regular-webfont.ttf') %>") format('truetype'),
  url("<%= font_path('proximanova-regular-webfont.svg#ProximaNovaRegular') %>") format('svg');
}

@font-face {
  font-family: "museo",'ProximaNovaBold', serif;
  src: url('<%= font_path('proximanova-bold-webfont.eot') %>');
  src: url('<%= font_path('proximanova-bold-webfont.eo') %>t') format('embedded-opentype'),
  url('<%= font_path('proximanova-bold-webfont.woff') %>') format('woff'),
  url('<%= font_path('proximanova-bold-webfont.ttf') %>') format('truetype'),
  url('<%= font_path('proximanova-bold-webfont.svg#ProximaNovaBold') %>') format('svg');
}

我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

我知道这可能是最基本的答案,但您是否检查了“套件设置”并确保您的域拼写正确?

相关问题