Bootstrap - about fonts files (.eot .svg .ttf .wof

2019-03-19 03:12发布

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

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

1条回答
淡お忘
2楼-- · 2019-03-19 04:00

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

查看更多
登录 后发表回答