什么是WOFF2?网页开放字体格式2.0解释

WOFF2是W3C网页字体格式,使用Brotli压缩进一步缩小TrueType/OpenType字体。了解WOFF2的工作原理。

免费在线文件转换工具。在 Windows、macOS、Linux、Android 和 iOS 上的 Chrome、Firefox、Safari、Edge、Opera 及其他现代浏览器中运行。无需安装软件或注册。所有转换都直接在您的浏览器中进行,因此您的文件不会离开您的设备。免费使用,无需账户。

Font

什么是WOFF2?网页开放字体格式2.0解释

一种使用Brotli压缩的W3C网页字体格式,旨在实现最小的字体下载。

最后更新:

Year2018
TypeWeb font wrapper
UsageModern web fonts

What is it?

WOFF2 (Web Open Font Format 2.0) is the successor to WOFF, published as a W3C Recommendation in March 2018. Like WOFF, it wraps SFNT-based TrueType or OpenType fonts, but it achieves substantially smaller file sizes.

WOFF2 replaces WOFF's zlib compression with the Brotli algorithm and adds font-specific preprocessing of the glyph tables. This typically yields around 30% better compression than WOFF, while supporting the full TrueType/OpenType feature set including variable fonts and font collections.

Technical Specifications

DeveloperW3C (reference implementation by Google)
File Extension.woff2
MIME Typefont/woff2
Released2018 (W3C Recommendation)
TypeBrotli-compressed web font wrapper (SFNT-based)

Pros & Cons

Advantages

一流的压缩

WOFF2 uses Brotli plus glyph-table preprocessing, typically about 30% smaller than WOFF for faster loading.

全面的功能支持

It supports the entire TrueType/OpenType spec, including variable fonts, color fonts, and font collections.

广泛的浏览器采用

WOFF2 is implemented in all major modern browsers and is widely used in production.

在移动设备上高效

Brotli decoding is designed to be fast and memory-friendly even on lower-end mobile devices.

Disadvantages

不支持非常旧的浏览器

Legacy browsers that predate WOFF2 require a WOFF or TTF fallback.

仅限于网页格式

WOFF2 is designed for web delivery and is not used for desktop installation or print.

需要Brotli工具

Creating WOFF2 requires Brotli-capable tools, though these are now widely available.

When to Use It

WOFF2 is the default modern format for serving custom web fonts.

主要的网页字体交付

Sites serve WOFF2 first via @font-face to give most visitors the smallest, fastest fonts.

可变字体部署

WOFF2 efficiently delivers variable fonts, packing many weights and styles into one compressed file.

性能优化

Developers adopt WOFF2 to reduce page weight and improve Core Web Vitals on font-heavy pages.

How to open a WOFF2 file

Software for working with WOFF2 files can be categorized into professional tools, free/open-source options, browser-based utilities, and built-in applications. Professional tools often cater to designers and developers needing advanced features, while free/open-source options are suitable for users on a budget. Browser-based utilities provide quick access without installation, making them ideal for casual users. Built-in applications may offer basic functionality for users who need minimal editing or viewing capabilities.

When choosing software for WOFF2, key factors include feature fidelity, whether editing or viewing is required, cost model, and platform compatibility. Users should consider if they need robust editing features or simple viewing capabilities. Export needs are also crucial, as some tools may offer limited output formats. In cases where extensive editing is unnecessary, converting WOFF2 to other formats might be a more efficient solution.

FontForge 2023

Windows, macOS, LinuxFree (GPL)

FontForge is a free and open-source font editor that supports WOFF2 files. It allows users to view and edit font glyphs, making it suitable for detailed font design work.

主要功能
  • Full glyph editing and manipulation
  • Support for multiple font formats
  • OpenType and TrueType support
  • Kerning and hinting adjustments
优点
  • Comprehensive editing capabilities for fonts
  • Supports a wide range of font formats
  • Active community and extensive documentation
局限
  • Steeper learning curve for beginners
  • User interface can be less intuitive

可导出为: TTF, OTF, WOFF, WOFF2, SVG

适合: FontForge is ideal for users needing a powerful, free tool for comprehensive WOFF2 font editing.

访问 FontForge →

Transfonter 2023

All (browser)Free / Paid

Transfonter is a web-based service that allows users to convert WOFF2 files into various web font formats. It is user-friendly and focuses on quick conversions rather than extensive editing.

主要功能
  • Batch conversion of font files
  • Options for font subsetting
  • Custom CSS generation for web use
  • Preview of converted fonts
优点
  • Quick and easy to use online tool
  • No installation required
  • Supports multiple font formats
局限
  • Limited editing capabilities
  • Dependent on internet connection

可导出为: WOFF, TTF, EOT, SVG

适合: Transfonter is perfect for users needing fast and simple WOFF2 conversions without installation.

访问 Transfonter →

Glyphs 3.0

macOSOne-time $299

Glyphs is a professional font creation tool that supports WOFF2 files, offering advanced features for type designers. It allows for precise control over font design and export options.

主要功能
  • Advanced glyph editing tools
  • Multiple master and variable font support
  • Extensive OpenType feature support
  • Export to multiple web font formats
优点
  • Highly professional and feature-rich
  • Intuitive interface for designers
  • Strong support for modern font technologies
局限
  • High cost may deter casual users
  • macOS only limits accessibility

可导出为: TTF, OTF, WOFF, WOFF2, SVG

适合: Glyphs is best for professional type designers who require a comprehensive and powerful tool for WOFF2 font creation.

访问 Glyphs →

Webfont Generator 2023

All (browser)Free / Paid

Webfont Generator is an online tool that converts fonts, including WOFF2, into web-friendly formats. It is designed for web developers looking to optimize font delivery for websites.

主要功能
  • Upload and convert multiple font formats
  • Generate CSS for web integration
  • Options for font subsetting
  • Preview fonts before download
优点
  • Simple and effective web-based tool
  • No software installation required
  • Generates necessary CSS automatically
局限
  • Limited editing features
  • Free version has some restrictions

可导出为: WOFF, TTF, EOT, SVG

适合: Webfont Generator is ideal for web developers needing a straightforward solution for converting WOFF2 fonts for online use.

访问 Webfont Generator →

Convert WOFF2 Files Free

Use our free online converter to convert WOFF2 and other formats - no signup, no watermarks.

Try Font Converter Free

References

  1. WOFF File Format 2.0 - W3C
  2. WOFF 2.0 improves compression - W3C Press Release
  3. Web Open Font Format - Wikipedia
  4. font/woff2 media type - IANA