aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/guide/woff/index.html
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:29:51 +0100
committerGitHub <noreply@github.com>2021-02-11 18:29:51 +0100
commit2bc5610921312613f8623f7ed347aa576689b2b6 (patch)
treef17a7a00e232c97d1335ff3cb24dbcfafacfe141 /files/zh-cn/web/guide/woff/index.html
parent964decad361766e85d928a56f0ab80af0e75c172 (diff)
parentfc56124ac4eda6b3f0349c8a16fa750f27b4c7d6 (diff)
downloadtranslated-content-2bc5610921312613f8623f7ed347aa576689b2b6.tar.gz
translated-content-2bc5610921312613f8623f7ed347aa576689b2b6.tar.bz2
translated-content-2bc5610921312613f8623f7ed347aa576689b2b6.zip
Merge pull request #32 from fiji-flo/unslugging-zh-cn
Unslugging zh cn
Diffstat (limited to 'files/zh-cn/web/guide/woff/index.html')
-rw-r--r--files/zh-cn/web/guide/woff/index.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/files/zh-cn/web/guide/woff/index.html b/files/zh-cn/web/guide/woff/index.html
new file mode 100644
index 0000000000..780ee248b8
--- /dev/null
+++ b/files/zh-cn/web/guide/woff/index.html
@@ -0,0 +1,62 @@
+---
+title: 网页开放字体格式(WOFF)
+slug: Web/Guide/WOFF
+tags:
+ - WOFF
+ - 字体
+translation_of: Web/Guide/WOFF
+original_slug: WOFF
+---
+<p><strong>WOFF</strong>(网页开放字体格式) 是由 Mozilla 与 Type Supply, LettError 及其他组织协同开发的一种新的网页字体格式。它使用了一种压缩版本,类似于 TrueType, OpenType, Open Font 所采用的 SFNT 结构,不过还添加了共用数据及用户私有数据结构,其中包括了自定义空间,其允许厂家和经销商提供许可证。</p>
+
+<p>WOFF 有以下三点优势:</p>
+
+<ol>
+ <li>字体采用压缩格式,相对于使用不压缩的 TrueType, OpenType 的网站,将占用更少的带宽,获得更快的加载速度。</li>
+ <li>许多字体经销商并不愿意将 TrueType 或 OpenType 的许可证颁发给网站,他们更愿意颁发 WOFF 的许可证。这对于网站开发者来说将是一个福音。</li>
+ <li>无论是收费还是免费的浏览器厂家都喜欢 WOFF 格式,因此它很可能成为未来的主流与跨平台字体格式。</li>
+</ol>
+
+<h2 id="使用_WOFF">使用 WOFF</h2>
+
+<p>通过 {{ cssxref("@font-face") }} 这个 CSS 属性来为你的网站使用 WOFF 字体。它的工作方式与 OpenType 和 TrueType 十分相似,除了因使用压缩技术而使你的内容更快地加载。</p>
+
+<h2 id="相关工具">相关工具</h2>
+
+<ul>
+ <li><a href="https://people.mozilla.org/~jkew/woff/">Tools for working with WOFF</a> fonts are available. <code>sfnt2woff</code> 和 <code>woff2sfnt</code> 将转换为 WOFF 或 OpenType.</li>
+</ul>
+
+<h2 id="Specifications" name="Specifications">文档</h2>
+
+<table>
+ <thead>
+ <tr>
+ <th scope="col">文档</th>
+ <th scope="col">状态</th>
+ <th scope="col">注释</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('WOFF2.0', '', '')}}</td>
+ <td>{{Spec2('WOFF2.0')}}</td>
+ <td>新压缩算法</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('WOFF1.0', '', '')}}</td>
+ <td>{{Spec2('WOFF1.0')}}</td>
+ <td>原始规格</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容">浏览器兼容</h2>
+
+<p>{{Compat("css.at-rules.font-face")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{ cssxref("@font-face") }} </li>
+</ul>