rhczz/dsh-plugin-ui-font-family ↗★ 0
dsh-plugin-ui-font-family
在通用设置中提供内置、系统及上传字体的切换 适合需要自定义Web界面显示字体、上传个性化字体文件的用户
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:rhczz/dsh-plugin-ui-font-family说明文档
阅读完整 README ↗配置
一般不用配。要改的话写进 profile 自己的 $DSH_HOME/profiles/web/cordis.patch.yml:
- id: ui-font-family
config:
# 这个部署的默认字体;用户没选过时用它,用户点「恢复默认」也回到它
defaultFamily:
source: preset
id: serif
| 字段 | 默认值 | 说明 |
|---|---|---|
fontDir | $DSH_HOME/fonts | 上传字体的存放目录 |
systemFontDirs | [] | 额外扫描的字体目录,排在平台默认目录之后 |
scanSystemFonts | true | 设为 false 就不再扫描系统字体目录(systemFontDirs 里写明的目录不受影响) |
maxUploadBytes | 20971520(20 MiB) | 单个上传文件的大小上限 |
defaultFamily | { source: preset, id: default } | 这个部署的默认字体 |
dshHome | $DSH_HOME,再退回 ~/.dsh | 覆盖 harness home 的判定 |
defaultFamily 的 source 取 preset / system / upload,id 分别是预设名、字体族名、上传后的文件名。用户自己的选择永远压在它上面。
maxUploadBytes 写了非整数、或 defaultFamily 指向不存在的预设,dsh 会在启动时直接报错,而不是等到用的时候才出问题。