我正在一个需要在线进行字体测试的网站上,我拥有的字体都是.otf
有没有一种方法可以嵌入字体并使它们在所有浏览器上都能正常工作?
如果没有,我还有什么其他选择?
在网络浏览器上使用.otf字体
我正在一个需要在线进行字体测试的网站上,我拥有的字体都是.otf
有没有一种方法可以嵌入字体并使它们在所有浏览器上都能正常工作?
如果没有,我还有什么其他选择?
第2271篇《在网络浏览器上使用.otf字体》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点
相似问题
问题类别
您可以
OTF
使用@ font-face 实现字体,例如:However if you want to support a wide variety of modern browsers i would recommend you to switch to
WOFF
andTTF
font types.WOFF
type is implemented by every major desktop browser, while theTTF
type is a fallback for older Safari, Android and iOS browsers. If your font is a free font, you could convert your font using for example a onlinefontconverter.If you want to support nearly every browser that is still out there (not necessary anymore IMHO), you should add some more font-types like:
You can read more about why all these types are implemented and their hacks here. To get a detailed view of which file-types are supported by which browsers, see:
@font-face Browser Support
EOT Browser Support
WOFF Browser Support
TTF Browser Support
SVG-Fonts Browser Support
hope this helps