Skip to content

Commit

Permalink
更新:直接使用 woff2 工具
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Jun 23, 2023
1 parent 92aaade commit 26f0f2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/zh/tech/可变字体(Variable Fonts)尝鲜.md
Expand Up @@ -20,7 +20,7 @@ gitinfo = true

首先,我们[去 GitHub 上下载 Amstelvar 字体](https://github.com/TypeNetwork/Amstelvar/tree/master/fonts),将 `Amstelvar-Roman-VF.ttf` 和其斜体 `Amstelvar-Italic-VF.ttf` 下载到本地。

然后,我们将 `.ttf` 压缩成既现代又节约的 `.woff2`可以使用 [ttf2woff2](https://github.com/nfroidure/ttf2woff2),或者你也可以尝试其它方法。
然后,我们将 `.ttf` 压缩成既现代又节约的 `.woff2`可以直接使用 [woff2](https://github.com/google/woff2)[Arch Linux](https://archlinux.org/packages/extra/x86_64/woff2/)[macOS](https://formulae.brew.sh/formula/woff2),或者你也可以尝试其它方法。

接下来,我们添加 CSS 代码,使用 `@font-face` 指定一下我们要使用的字体:

Expand Down Expand Up @@ -250,6 +250,7 @@ body {
}

/* Amstelvar Roman 字体目前所支持的所有变形轴 */
/* 最新支持请查看 https://github.com/googlefonts/amstelvar#axes */
body {
font-variation-settings:
/* Weight */
Expand Down

0 comments on commit 26f0f2d

Please sign in to comment.