The Web Open Font Format (WOFF)

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2016.

WOFF(Web Open Font Format) — формат шрифтов, разработанный Mozilla совместно с Type Supply, LettError, и др. По сути — это сжатая версия формата sfnt, используемого шрифтами TrueType, OpenType, и Open Font Format, но с возможностью добавления мета-данных и приватных структур данных (private-use data structures). Например, в формате предусмотрены поля для ввода информации о лицензии.

Преимущества использования WOFF:

  1. The font data is compressed, so sites using WOFF will use less bandwidth and will load faster than if they used equivalent uncompressed TrueType or OpenType files.
  2. Many font vendors that are unwilling to license their TrueType or OpenType format fonts for use on the web will license WOFF format fonts. This improves availability of fonts to site designers.
  3. Both proprietary and free software browser vendors like the WOFF format, so it has the potential of becoming a truly universal, interoperable font format for the web, unlike other current font formats.

Существует две версии WOFF, отличающихся используемым алгоритмом сжатия: WOFF и WOFF2. В правиле @font-face они определяются в дескрипторе format как 'woff' или 'woff2' соответственно.

Использование WOFF

You can use the @font-face CSS property to use WOFF fonts for text in web content. It works exactly like OpenType and TrueType format fonts do, except it will likely let your content download more efficiently due to the addition of compression.

Tools for working with WOFF fonts

Спецификации

Specification
WOFF File Format 1.0
# OverallStructure
WOFF File Format 2.0
# FileStructure

Совместимость с браузерами

css.at-rules.font-face.WOFF

BCD tables only load in the browser

css.at-rules.font-face.WOFF_2

BCD tables only load in the browser

Смотрите также