gpt4 book ai didi

css - 从自己的服务器使用类似 api 的字体的经验?

转载 作者:行者123 更新时间:2023-11-28 07:49:42 24 4
gpt4 key购买 nike

我可以看到它是 pretty easy to use google fonts通过在 google api 中使用 @import 链接,但我想知道如果没有 api,你怎么能以某种方式做到这一点。有没有办法在我的机器上获取它?我不熟悉在没有 api 链接的情况下使用字体。

基本上,有没有一种方法可以在不链接 api 的情况下使用这种字体?

最佳答案

使用字体

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face

@font-face {
font-family: "namefont";
src: url("namefont.eot");
src: url("namefont.eot?#iefix") format("embedded-opentype"),
url("namefont.woff") format("woff"),
url("namefont.ttf") format("truetype"),
url("namefont.svg#namefont") format("svg");
font-weight: normal;
font-style: normal;
}

关于css - 从自己的服务器使用类似 api 的字体的经验?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30492006/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com