【发布时间】:2014-02-21 18:53:16
【问题描述】:
我在 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');
}
我在这里做错了什么?
【问题讨论】:
标签: css ruby-on-rails fonts ruby-on-rails-4 typekit