字体文件地址
https://atomgit.com/m0_57855259/skills/tree/main/office-font-install/fonts
步骤
- 下载字体文件。
-
Windows 安装
powershell $shell = New-Object -ComObject Shell.Application $fontFolder = $shell.Namespace(0x14) Get-ChildItem /path/to/fonts -Include *.ttf,*.otf -File | ForEach-Object { Write‑Host "安装 $($_.FullName)" $fontFolder.CopyHere($_.FullName) } -
Linux 安装(适用于大多数发行版)
- 下载所需的 TTF 字体文件。
- 打开终端并创建本地字体目录(如果没有的话):
bash
mkdir -p ~/.fonts
- 将 TTF 字体文件复制到该目录下:
bash
cp /path/to/fonts ~/.fonts/
- 更新字体缓存:
bash
fc-cache -fv
- 返回:成功返回
Installed fonts from fonts/,如有错误会输出错误信息。