什么是WOFF?网络开放字体格式解析

WOFF(Web开放字体格式)是W3C标准化的网页字体,压缩TrueType/OpenType字体以加快传输速度。

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

Font

什么是WOFF?网络开放字体格式解析

一种W3C网络字体格式,封装并压缩TrueType或OpenType字体。

最后更新:

Year2012
TypeWeb font wrapper
UsageWeb fonts (@font-face)

What is it?

WOFF (Web Open Font Format) is a font packaging format designed for use on the web and published as a W3C Recommendation in December 2012. It is essentially a compressed wrapper around existing SFNT-based fonts such as TrueType and OpenType.

A WOFF file contains the same font tables as the original TTF or OTF, but compressed (using zlib) and accompanied by optional metadata. Browsers decompress the font and use it via CSS @font-face, reducing download size compared with raw TTF/OTF files.

Technical Specifications

DeveloperW3C (based on work by Mozilla and others)
File Extension.woff
MIME Typefont/woff
Released2012 (W3C Recommendation)
TypeCompressed web font wrapper (SFNT-based)

Pros & Cons

Advantages

更小的下载

WOFF compresses font tables with zlib, typically reducing TrueType file sizes by 40% or more for faster page loads.

广泛的浏览器支持

All major browsers support WOFF, making it a safe baseline web font format.

保留字体数据

WOFF wraps the original SFNT tables losslessly, so the font's outlines and features are fully retained.

元数据支持

The format can embed licensing and provenance metadata alongside the font.

Disadvantages

被WOFF2取代

WOFF2 offers significantly better compression, so WOFF is now mostly a fallback for older browsers.

仅限于网页用途

WOFF is intended for web delivery and is not used as a desktop or print font format.

解压缩开销

Browsers must decompress the font before use, a minor cost compared with raw SFNT files.

When to Use It

WOFF is used to deliver custom fonts efficiently on websites.

CSS @font-face网页字体

WOFF is referenced in stylesheets to serve branded typefaces to site visitors.

旧版浏览器回退

Sites provide WOFF alongside WOFF2 so older browsers that lack WOFF2 still render custom fonts.

字体托管服务

Web font providers deliver WOFF to ensure wide compatibility across browsers.

How to open a WOFF file

Software for working with WOFF files generally falls into four categories: professional design tools, free or open-source applications, web-based browser tools, and built-in system utilities. Professional tools are suited for designers and developers who require extensive features and high fidelity, while free and open-source options cater to those with budget constraints. Browser tools are ideal for quick tasks without installation, and built-in utilities are convenient for basic needs.

When choosing software for WOFF specifically, important factors include feature fidelity, whether you need editing capabilities or just viewing, cost, platform compatibility, and export options. If you need to manipulate font files extensively, a professional tool is preferable, while simple viewing might be handled by a browser tool. Additionally, consider whether converting to other formats is necessary for your workflow.

FontForge 2023

Windows, macOS, LinuxFree (GPL)

FontForge is an open-source font editor that supports WOFF files among many other formats. It allows users to create, edit, and convert fonts, providing a high level of fidelity and control over font design.

主要功能
  • Full font editing capabilities
  • Support for multiple font formats
  • Advanced kerning and hinting tools
  • Batch conversion to various formats
优点
  • Comprehensive editing features for WOFF
  • Free and open-source with community support
  • Cross-platform compatibility
局限
  • Steeper learning curve for beginners
  • Interface may feel outdated

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

适合: FontForge is ideal for users needing extensive editing and conversion capabilities for WOFF files.

访问 FontForge →

Transfonter 2023

All (browser)Free / Paid

Transfonter is a web-based tool designed for converting fonts to web formats, including WOFF. It allows users to upload font files and generate WOFF files quickly, making it suitable for web developers.

主要功能
  • Upload multiple font formats
  • Generate WOFF and WOFF2 files
  • CSS generation for web use
  • Customization of font subsets
优点
  • User-friendly interface for quick conversions
  • No installation required, works in any browser
  • CSS integration for easy web use
局限
  • Limited editing capabilities
  • Dependent on internet connection

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

适合: Transfonter is perfect for web developers needing a quick and easy way to convert fonts to WOFF.

访问 Transfonter →

Glyphs 3.0

macOSOne-time $299

Glyphs is a professional font creation tool that supports WOFF files, allowing designers to create and edit fonts with precision. It offers a rich set of features for font design and export.

主要功能
  • Intuitive interface for font design
  • Support for variable fonts
  • Extensive OpenType feature support
  • Export to multiple font formats
优点
  • High-quality font design tools
  • Excellent support for OpenType features
  • Active community and resources
局限
  • High cost may deter casual users
  • macOS only limits accessibility

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

适合: Glyphs is best for professional font designers looking for advanced features and high-quality output for WOFF.

访问 Glyphs →

Web Font Generator 2023

All (browser)Free

Web Font Generator is a straightforward online tool that converts font files into web-compatible formats, including WOFF. It is designed for quick and easy font conversion for web use.

主要功能
  • Drag-and-drop file upload
  • Generate WOFF and WOFF2 formats
  • Basic font customization options
  • Downloadable CSS for web integration
优点
  • Simple and fast conversion process
  • No software installation needed
  • Free to use with no hidden fees
局限
  • Limited editing features
  • Basic customization options only

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

适合: Web Font Generator is ideal for users needing a quick and easy solution for converting fonts to WOFF without installation.

访问 Web Font Generator →

Convert WOFF Files Free

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

Try Font Converter Free

References

  1. WOFF File Format 1.0 - W3C
  2. Web Open Font Format - Wikipedia
  3. WOFF and WOFF2 font formats - MDN Web Docs
  4. font/woff media type - IANA