自定义字体在Chrome / Safari中无法呈现 [英] Custom fonts not rendering in Chrome/Safari
问题描述
我使用CSS方法通过使用CSS类中的字体名称从fonts.com渲染字体
I'm using the CSS method to render fonts from fonts.com by using the font name in a CSS class like
.myFont h3 {
background-color: #FFFFFF;
color: #000000;
font-family: "ReformaGroteskW01-Mediu";
font-size: 40px;
font-weight: normal;
letter-spacing: 0.04em;
margin: 0 auto;
padding: 0 7px;
text-transform: uppercase;
width: 105px;
}
使用fonts.com提供的这个链接标签,这适用于Firefox,但不适用于chome和Safari,似乎webkit浏览器不链接的东西在这里,我将作为fonts.com的支持,但我发现他们的支持非常缓慢。
And the font is linked using this link tag provided by fonts.com, this works for Firefox but not for chome and Safari, seems like the webkit browser doesn't link something here, I would as the support at fonts.com but I have found their support to be very slow in the past.
<link type="text/css" rel="stylesheet" href="http://fast.fonts.com/cssapi/11386172-45ea-43f5-93bd-d795e60c00af.css">
推荐答案
为什么不下载你喜欢的字体,把它放在你的文件?
Why don't you download the font you like and put it in your files? That's way better and might solve your problem too.
此外,不要使用 font-family
和 font-size
。将它们放在字体
标签中。
Besides, don't use font-family
and font-size
apart. Put them together in the font
tag.
这篇关于自定义字体在Chrome / Safari中无法呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!