惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
博客园 - 叶小钗
V
V2EX
博客园 - Franky
博客园_首页
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
S
SegmentFault 最新的问题
B
Blog RSS Feed
博客园 - 【当耐特】
D
Docker
N
Netflix TechBlog - Medium

卡库伊2.0

联想小新 Pro13 ARE 2020 降频 用cloudflare来识别访客IP判断国家 批量计算文件hash 通过SSH同步数据 Indesign的一些技巧 一个无广告和弹窗的搜狗输入法 – 卡库伊2.0 Linux挂载nas路径 – 卡库伊2.0 ffmpeg将mp4转为m3u8 – 卡库伊2.0 php和nginx默认端口冲突 – 卡库伊2.0 计划任务:git同步 – 卡库伊2.0 Cloudflare免费缓存 – 卡库伊2.0 搜狗输入法去广告和弹窗 – 卡库伊2.0 FRP+反代的重定向 – 卡库伊2.0 网页小游戏 – 卡库伊2.0
引用中文字体文件太大如何解决 – 卡库伊2.0
Author sunplace · 2025-12-31 · via 卡库伊2.0

引用中文字体文件太大如何解决

1. 安装node.js

2. 安装cn-font-split

npm install -g cn-font-split --unsafe-perm

3. 拆分字体

cn-font-split run \
  -i ./Font.ttf \
  -o ./font-dist / \
  --css.fontFamily="MyFont" \
  --testHtml=true

4. 引用字体

@import url("/font-dist/result.css");
body {
    font-family: "MyFont", serif;
}

5. 删除原来的字体文件(可选)