dsh-font-probe
Manifest valid★ 3DSH 字体插件:中英文字体分设、正文字号与代码字号、字距/行距/段距/首行缩进四根滑块,吸底总预览 + 确认制,配置写回 profile,不动 app.asar。
dsh-font-probe
给 DeepSeek Harness 的 Web 界面换字体、调排版,全程在设置里点,不动 app.asar。
中英文字体分开设、字号分正文与代码、字距行距段距首行缩进四根滑块, 改完先在吸底总预览里看准,再一键确认 —— 配置写回 profile,重启不丢。
中文优先。English readers: see English at the bottom.
为什么需要它
DSH 的 GUI 只内置了配色方案和正文字号(10–22px),没有字体族选项。
想换字体,直觉做法是改 app.asar 里的 CSS —— 但那是应用本体,
每次升级都会被覆盖,而且改坏了很难还原。
这个插件走 Cordis 的客户端插件通道,用公开的 styles.insert() 注入样式,
只覆盖 CSS 自定义属性,不修改任何应用文件,因此:
- 升级 DSH 不会丢设置
- 卸载插件即完全还原
- 配置存在 profile 里,可携带、可版本控制
功能
| 能力 | |
|---|---|
| 中文字体 | 汉字独立设族名。点名称展开预设,其它族走「浏览本机字体…」 |
| 英文字体 | 只作用于拉丁字母与数字,汉字仍用中文字体。留空则不区分 |
| 代码字体 | 代码块 / 终端 / 行号的等宽字体,同样可浏览本机字体 |
| 正文字号 / 代码字号 | 同一行左右并排,中间竖线分隔 |
| 字距 | 滑块 0–3px |
| 行距 | 滑块 0–12px,在应用自身行高之上叠加,不是替换 |
| 段距 | 滑块 0–24px,段落之间 |
| 首行缩进 | 滑块 0–4em,随字号缩放 |
| 总预览 | 吸底卡片,字体 / 字距 / 行距 / 段距 / 缩进 / 代码样张一起实时预览 |
| 预览可伸缩 | 上缘拖动条调高度(80–560px),标题行可整块隐藏;偏好记在本地 |
| 缺字体可下载 | 展开预设时自动检测本机是否安装,缺的显示「下载」直达官方页 |
| 确认制 | 所有改动先进草稿,点「确认应用」才生效并落盘 |
| 恢复默认 | 一键清空草稿(仍需确认才生效) |
全部设置在 设置 → 文字显示设置。
截图

深色主题下的完整设置页:中英文字体各自独立、代码字体同样可浏览本机字体, 正文字号与代码字号左右并排,底部是吸底的总预览与确认栏。
安装
# 从 GitHub 直接装
dsh plugin --profile desktop add github:<lohana20061023-29>/dsh-font-probe
也可以从本地目录装(适合改代码调试):
dsh plugin --profile desktop add G:/path/to/dsh-font-probe
装完重启应用(托盘右键 → 退出应用 → 重新打开), 侧栏「设置」里就会出现「文字显示设置」。
首次安装后必须重启:插件是双半体(host + client), host 半体的配置 schema 要由模块加载器导入一次才生效。
更新与卸载
dsh plugin --profile desktop update dsh-font-probe
dsh plugin --profile desktop remove dsh-font-probe
卸载后样式表随之移除,界面字体立即回到应用默认。
用法
- 打开 设置 → 文字显示设置
- 挑中文字体、英文字体、代码字体与字号,拖四根滑块调排版
- 盯着底部总预览看效果
- 满意了再点 确认应用
没点确认之前,界面、CSS 变量、profile 三者都不会变 —— 可以放心反复试。
原理
插件只做两件事:注入 CSS 自定义属性 和 在一个样式表里写少量规则。
字体族
--dsw-font-family 是应用正文的字体令牌。插件合成为:
--dsw-font-family: "英文字体", "中文字体", <应用自带栈>;
CSS 字体栈按字符逐个回退:字母在 英文字体 里命中,汉字因为它没有字形而落到
中文字体。顺序反过来就不成立 —— 中文字体通常自带拉丁字形,放前面会让英文字体
永远轮不到。
字号与排版
| 目标 | 手段 |
|---|---|
| 正文 | 覆盖 --dsh-content-font-size |
| 代码 | pre, code, kbd, samp { font-size: … }(应用把代码字号写死在规则里,没有令牌) |
| 字距 / 行距 / 段距 / 缩进 | 只作用于 [class*="_markdown"],不碰设置面板自己的文字 |
行距是叠加而非替换,所以改字号时行高仍会等比变化:
line-height: calc(24px + var(--dsh-content-font-delta, 0px) + <你的值>px) !important;
长字体名
原生 <select> 只能截断,无法动画。插件改成自绘触发按钮:
渲染后实测溢出像素写进 --fp-marquee-x,只在真的溢出时挂 keyframes 缓慢左右往返。
已知限制
- 只影响 Web GUI,不含 Native 窗口/菜单字体
- 排版四项只对对话正文生效,不改侧栏、按钮等界面文字
- 「浏览本机字体」依赖 Local Font Access API(Chromium 内核有), 不支持时退回预设列表
- 字体必须本机已安装,插件不带字体文件
- 某些字体只有单一字重(例如阿里妈妈数黑体只有 Bold),选中后整体会偏粗 —— 这是字体本身的性质
兼容性
- DSH 桌面版 /
dsh web - 依赖
@deepseek-ai/dsh-client-ui-renderer、@deepseek-ai/dsh-client-ui-settings - 无第三方运行时依赖
开发
dsh-font-probe/
├── package.json # dsh.client 声明 + dsh.bundle.patch
├── cordis.patch.yml # 把插件插入 bundles
├── index.js # host 半体:Config schema(字段必须 .volatile())
└── client.js # client 半体:设置页 + 样式注入
改 client.js:应用运行中会被 client-hmr 自动推送(约 500ms),刷新即可见。
改 index.js / package.json:必须重启应用(ESM 按 URL 缓存,热更不会重载 host)。
深入的踩坑记录(配置写入链路、volatile、服务就绪时序等)见
docs/INTERNALS.md。
更新日志
见 CHANGELOG.md。
许可
English
A client plugin that changes the DeepSeek Harness web UI font from Settings —
no app.asar edits, so DSH upgrades never overwrite your setup.
- Separate CJK / Latin / code font families, each pickable from the installed fonts
- Content and code font sizes
- Typography sliders: letter-spacing, line-height, paragraph spacing, first-line indent
- A sticky total preview that mirrors every draft change
- Draft-and-confirm model: nothing applies until you press Apply
- Settings persist to the profile and survive restarts
dsh plugin --profile desktop add github:<your-name>/dsh-font-probe
Restart the app once after installing. Everything lives under Settings → 文字显示设置 (Interface text).
Licensed under MIT.
Comments
Loading…
Similar plugins
by daha1216
DeepSeek Harness(DSH)字体定制插件:更换界面/代码字体与正文字号,识别本机已安装字体,设置持久化保存。
★ 0
MIT
JavaScript
Sep 13, 2026
dsh plugin --profile web add dsh-font-customizerby AnAcretiondisk9986
DeepSeek Harness 字体插件:中西文分别指定,界面 / 内容 / 代码三处独立 · Set the CJK and Latin families separately, and the interface, content and code faces independently.
★ 0
MIT
JavaScript
Oct 11, 2026
dsh plugin --profile web add dsh-font-masterby Leafmy
DeepSeek Harness (DSH) plugin: pick UI/code/terminal fonts visually - enumerate installed fonts, edit fallback stacks, import custom fonts, live preview, one-click reset. Applies through the official
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-font-managerby Wilyte
面向 DeepSeek Harness(dsh)Web GUI 的搜索插件,挂在内置右侧栏,不依赖 dsh-better-sidebar。 关键词模式搜文件名与文件内容,支持包含/排除 glob、大小写、正则与类型筛选,命中结果边搜边返回; 代码图模式通过 codegraph CLI 查符号并展开调用方/被调方。命中处高亮,点击即在编辑器中跳到该行。
★ 0
MIT
JavaScript
Oct 16, 2026
dsh plugin --profile web add dsh-codegraph-searchby senyayume
DSH 插件:在文件变更工具卡片上重绘行级 diff(相同行只渲染一次 + 行内字符高亮),覆盖 run_code(PTC) 与 str_replace_editor,轮末给出改动汇总卡,并可在资源管理器中定位或复制路径。
★ 0
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add dsh-edit-diffby hh719509125
DeepSeek Harness (DSH) 文档编辑插件:在右侧栏的文档预览里就地编辑文本文件并保存,支持 Ctrl+S、冲突保护、行尾逐字节保留。In-place document editor for the DSH Sidebar preview: Ctrl+S, conflict protection, byte-exact line-ending preservation.
★ 5
MIT
JavaScript
Oct 8, 2026
dsh plugin --profile web add @local/dsh-plugin-document-editor