Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CMBill authored Dec 27, 2023
1 parent 2ad8fc1 commit 3ae1ffb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@
为方便使用,本仓库的版本号将与字体原仓库版本号一致。目前只提供了 `v1.315` 及之后的版本。

## 使用
仓库包含如下字体,以表格中所示 `font-family``font-weight` 在 CSS 中调用即可。
| 字体 | `font-family` | `font-weight` |
| ---------------------- | ------------------------ | ------------- |
| LXGW Wenkai | `LXGW Wenkai` | `normal` |
| LXGW Wenkai Bold | `LXGW Wenkai` | `bold` |
| LXGW Wenkai Light | `LXGW Wenkai Light` | `normal` |
| LXGW WenKai Mono | `LXGW WenKai Mono` | `normal` |
| LXGW WenKai Mono Bold | `LXGW WenKai Mono` | `bold` |
| LXGW WenKai Mono Light | `LXGW WenKai Mono Light` | `normal` |

直接将文后提供的链接以 `<link>` 的形式添加到网页的 `<head>` 内即可,这样可以调用上述所有字体及变体,但是只会加载实际使用的字体所在分包文件,如:
```html
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/CMBill/lxgw-wenkai-web/style.css" />
<style>
body {
font-family: "LXGW WenKai";
font-weight: normal;
}
</style>
</head>
<body>

</body>
</html>
```

### 自行部署
如果下方提供的链接连接效果不甚理想,建议自行部署并配合自己的 CDN 使用。可以直接 Fork 本仓库并启用 Github Pages,使用时将下方链接修改为自己的仓库地址即可,亦可直接克隆本仓库到服务端、对象存储等。

Expand Down

0 comments on commit 3ae1ffb

Please sign in to comment.