如何在我的网页中使用诸如Agency FB,Berlin Sans,Century Gothic等字体,当在Google字体上进行搜索时,它们会重定向到其他网站,例如
https://store.typenetwork.com/foundry/fontbureau/fonts/agency-fb?src=GoogleFonts
https://www.fonts.com/font/monotype/century-gothic/regular
如果上传到Font Squirrel,则显示以下消息
字体局已要求将其字体Agency FB Regular列入黑名单。您将无法转换此字体。”
我尝试了以下代码(可用于非这种类型的字体)
@font-face
{
font-family: 'airstrike';
src: url('fonts/airstrike-webfont.woff2') format('woff2'),
url('fonts/airstrike-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
请专家,帮我解决这个基本问题(但不利于我的网页设计),因为这是我网页上剩下的最后一个问题。
最佳答案
问题解决了。我从https://www.whatfontis.com/下载了受版权保护的原始字体的相似字体,并提取了.ttf文件,并将其上传到https://www.fontsquirrel.com/,然后将其转换为两个扩展名为.woff和.woff2的文件,并提供了示例样式表。我只是将代码复制到了.css文件中,并进行了相应的修改。这是我使用的代码
@font-face
{
font-family: 'agency';
src: url('fonts/agency-webfont.woff2') format('woff2'),
url('fonts/agency-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}