我必须为我在Typekit中找不到并且无法上传到Fontsquirrel的网站使用字体。所以我无法制作webkit。我尝试用CSS嵌入字体@font-face
, 但它似乎不起作用。
这是我的CSS:
@font-face {
font-family: "Oz Handicraft";
src: url(localhost/wordpress/wp-content/themes/twentythirteen_child/ozHandicraft.otf);
font-weight: normal;
}
@font-face {
font-family: "Liberation Regular";
src: url(public_html/your-site/wp-content/themes/twentythirteen_child/liberationRegular.tff);
font-weight: normal;
}
@font-face {
font-family: "Liberation Bold";
src: url(public_html/your-site/wp-content/themes/twentythirteen_child/liberationBold.tff);
font-weight: normal;
}
@font-face {
font-family: "Liberation Bold Italic";
src: url(public_html/your-site/wp-content/themes/twentythirteen_child/liberationBoldItalic.tff);
font-weight: normal;
}
@font-face {
font-family: "Liberation Italic";
src: url(public_html/your-site/wp-content/themes/twentythirteen_child/liberationItalic.tff);
font-weight: normal;
}
有人能帮我吗?编辑:我终于找到了问题,现在看来它正在工作。
@font-face {
font-family: "Oz Handicraft";
src: url(fonts/ozHandicraft.otf);
我的错误是,我在url中编写了完整的路径,而不是样式表中的路径(位于主题文件夹中)