【发布时间】:2016-01-20 09:45:10
【问题描述】:
我正在尝试在我的 drupal 网站中包含我自己的字体。我在“sites/all/themes/mytheme/css”文件夹中的主题中有一个 custom.css 文件。我的字体在我的 'sites/all/themes/mytheme/fonts' 文件夹中。从我的主题文件夹中的 template.php 调用 css。 这是我现在的 CSS 代码:
@font-face {
font-family: 'slashbadass_black';
src: url('../fonts/Myfont.eot');
src: url('../fonts/Myfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Myfont.woff2') format('woff2'),
url('../fonts/Myfont.woff') format('woff'),
url('../fonts/Myfont.ttf') format('truetype'),
url('../fonts/Myfont.svg#slashbadass_black') format('svg');
font-weight: normal;
font-style: normal;
}
那么这条路好吗?对于我所看到的字体系列现在不可用。
【问题讨论】: