引导 - 关于字体文件(.eot .svg .ttf .woff和.woff2)角色和用法 [英] Bootstrap - about fonts files (.eot .svg .ttf .woff and .woff2) roles and usages

查看:1205
本文介绍了引导 - 关于字体文件(.eot .svg .ttf .woff和.woff2)角色和用法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Bootstrap 3的fonts文件夹中,我们可以看到这些文件:

In the fonts folder of Bootstrap 3, we can see those files:


  • glyphicons-halflings-regular.eot

  • glyphicons-halflings-regular.svg

  • glyphicons-halflings-regular.ttf

  • glyphicons-halflings-regular.woff

  • glyphicons-halflings-regular.woff2

  • glyphicons-halflings-regular.eot
  • glyphicons-halflings-regular.svg
  • glyphicons-halflings-regular.ttf
  • glyphicons-halflings-regular.woff
  • glyphicons-halflings-regular.woff2

格式?它们都是必要的吗?每个文件的作用/用法是什么?

Are they all the same files converted in different formats? Are they all necessary? What is the role/usage of each file?

推荐答案

包含它们是因为每个字体都是为了解决不同的问题而创建的。 Woff和woff2是旨在停止字体盗版的最新格式。 Svg也是一种较新的格式,它是一个矢量文件,并在iOS移动设备上使用。 Tff和eot是旧浏览器使用的旧学校格式,但它们允许任何人免费下载和使用字体。

They are included because each font was created to solve different problems. Woff and woff2 are the newest formats which were designed to stop font piracy. Svg is also a newer format which is a vector file and used on iOS mobile devices. Tff and eot are old school formats used by old browsers, but they allow anyone to download and use the font for free.

简短的答案:版本跨浏览器兼容性。

Short answer: They are all included for multi-version cross-browser compatibility.

请参阅:

See: Why should we include ttf, eot, woff, svg,... in a font-face

这篇关于引导 - 关于字体文件(.eot .svg .ttf .woff和.woff2)角色和用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆