下载字体
开源字体
1
| https://github.com/fontworks-fonts/Klee/tree/master/fonts/ttf
|
下载后格式转换
1
| https://www.fontsquirrel.com/tools/webfont-generator
|
参考文档:
https://blog.csdn.net/qq_30997503/article/details/109551074
下载后复制到 hexo项目的themes/nmk_hexo/source/fonts下
1 2 3 4 5 6 7
| ➜ ~ tree Klee_One Klee_One ├── kleeone-regular-webfont.eot ├── kleeone-regular-webfont.svg ├── kleeone-regular-webfont.ttf ├── kleeone-regular-webfont.woff └── kleeone-regular-webfont.woff2
|
修改themes/nmk_hexo/source/css/font.styl的配置为
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| @font-face { font-family: 'klee_oneregular'; src: url('../fonts/Klee_One/kleeone-regular-webfont.eot'); src: url('../fonts/Klee_One/kleeone-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Klee_One/kleeone-regular-webfont.woff2') format('woff2'), url('../fonts/Klee_One/kleeone-regular-webfont.woff') format('woff'), url('../fonts/Klee_One/kleeone-regular-webfont.ttf') format('truetype'), url('../fonts/Klee_One/kleeone-regular-webfont.svg#klee_oneregular') format('svg'); font-weight 300; font-style: normal;
}
$font-family = klee_oneregular
|
或者直接使用系统的
1
| $font-family = Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif
|
Author:
nmk
Permalink:
http://nmk0718.github.io/2024/08/27/hexo更换字体/
License:
Copyright (c) 2020 CC-BY-NC-4.0 LICENSE