内置霞鹜文楷(LXGW WenKai)字体的插件:零配置把网页界面与对话文字切换为楷体风格,优先使用系统已安装字体,未安装时按需加载包内离线字体。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:AaronOhO/dsh-plugin-wenkai-font
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
A DeepSeek Harness plugin that switches the Web GUI's interface and conversation text to LXGW WenKai (霞鹜文楷). The web font is bundled, so it works offline: an installed copy of the typeface is used first (no download), and the packaged woff2 subsets are fetched only when the font is missing.
把 DeepSeek Harness 的界面 / 对话文字字体切换为 霞鹜文楷(LXGW WenKai) 的 Harness 插件。字体文件随插件内置,离线可用:系统已安装霞鹜文楷时直接使用本机字体(零下载),未安装时按需加载内置的 woff2 分片。
Install / 安装
dsh plugin --profile web add github:AaronOhO/dsh-plugin-wenkai-font
Or install this directory with Plugin Manager's install_bundle. Reload the page once after enabling: the Host half contributes the stylesheet to the index document, and the stylesheet is also attached to an already-open page when the client half loads.
也可以在本机用 Plugin Manager 的 install_bundle 直接安装本目录。启用后重新加载一次页面:Host 半会把样式表注入 index 文档,Client 半则负责给已经打开的页面补挂。
Scope / 生效范围
Interface and conversation text: the plugin puts LXGW WenKai ahead of the built-in text stack through the Harness theme variable
--dsh-font-family-text, sobodyand every component that reads--dsw-font-familyfollow (Markdown, composer, sidebar, settings, and so on).Code blocks and terminal are intentionally left alone: they follow
--ds-font-family-codeand the sidebar terminal's xterm font setting. Set them separately in Settings → General → More font settings (for exampleLXGW WenKai Mono, which requires the Mono variant to be installed). Choosing a text font in Settings writes the same variable inline onbody, so a user's explicit choice overrides this plugin's default.界面与对话文本:通过 Harness 主题变量
--dsh-font-family-text把「霞鹜文楷」放在内置字体栈之前,body(外壳样式)和所有读取--dsw-font-family的组件(Markdown、输入框、侧栏、设置页等)都会跟随。代码块 / 终端:有意不改,分别由
--ds-font-family-code与侧栏终端的 xterm 字体设置控制,可在 设置 → 通用 → 更多字体设置 中单独指定(例如终端用LXGW WenKai Mono,需系统已安装等宽版)。在设置里为「文本」另行选择字体时,设置值以内联变量写到body,会覆盖本插件的默认值——插件不会强制覆盖用户选择。
How it works / 实现方式
| Part | File | Role |
|---|---|---|
| Host half | index.js | Registers the prefix route /dsh-wenkai, serves font.css and the packaged woff2 subsets, and listens to webserver/index-inject to put the stylesheet <link> into the index document <head> before the app paints. |
| Client half | client.js | Attaches the same stylesheet to a page that was already open (skipped when the Host half already injected it) and removes the <link> on unload. |
| Stylesheet | assets/font.css |
97 @font-face rules: src first tries local("LXGW WenKai") / local("LXGWWenKai-Regular") / local("霞鹜文楷"), then the packaged subset; ends with :root{--dsh-font-family-text:"LXGW WenKai","霞鹜文楷"}. |
| Font assets | assets/fonts/*.woff2 |
LXGW WenKai Regular (400) split into woff2 subsets by unicode-range, copied byte-for-byte from lxgw-wenkai-webfont@1.7.0 (upstream v1.250); the OFL text ships alongside. |
| Bundle manifest | package.json / cordis.patch.yml | dsh.bundle.patch inserts the wenkai-font row; dsh.client declares the browser half. |
| Display metadata | locale/ / icon.png | Title, description, and icon shown by Plugin Manager. |
| 部分 | 文件 | 作用 |
|---|---|---|
| Host 半 | index.js | 注册前缀路由 /dsh-wenkai,提供 font.css 与内置 woff2 分片;监听 webserver/index-inject,把样式表 <link> 注入 index 文档 <head>,首屏即可用新字体 |
| Client 半 | client.js | 页面已在打开状态时补挂同一份样式表(Host 已注入时自动跳过),卸载插件时移除 <link> |
| 样式表 | assets/font.css |
97 条 @font-face:src 先尝试 local(...),再回退到内置分片;末尾 :root{--dsh-font-family-text:"LXGW WenKai","霞鹜文楷"} |
| 字体资源 | assets/fonts/*.woff2 |
霞鹜文楷 Regular(400)按 unicode-range 切分的 woff2 分片,逐字节复制;OFL 文本随附 |
| Bundle 清单 | package.json / cordis.patch.yml | dsh.bundle.patch 插入 wenkai-font 行;dsh.client 声明浏览器半 |
| 显示元数据 | locale/ / icon.png | 插件管理器中的标题、说明与图标 |
No tools, conversation rows, slots, or settings namespaces are modified. Disabling or uninstalling the plugin removes the route, the index injection, and the client stylesheet, and the default font returns.
没有工具、对话行、槽位或设置命名空间的改动;禁用或卸载插件即移除路由、index 注入与客户端样式表,字体恢复默认。
Settings / 启停
Toggle the "霞鹜文楷字体" row on the Plugins page (or through
plugin_manager/ the profile patch layer).The route prefix is
/dsh-wenkai/...; packaged subsets are fetched only for theunicode-rangechunks the page actually uses.在 Plugins 页面里启停「霞鹜文楷字体」一行,或通过
plugin_manager/ profile 补丁层操作。路由路径固定为
/dsh-wenkai/...;内置分片只为页面实际用到的 unicode 区段按需拉取。
Verify / 验证
- After the page loads,
document.fonts.check('16px "LXGW WenKai"')should betrue, andgetComputedStyle(document.body).fontFamilyshould mentionLXGW WenKai. curl -I http://127.0.0.1:<port>/dsh-wenkai/font.cssand any subset should return200with the rightcontent-type.- Plugin Manager's detail view should show the title and description and render this package's icon.
License / 许可
Plugin code and artwork are MIT (LICENSE). The bundled font is SIL Open Font License 1.1; copyright, source, modifications, and redistribution requirements are in FONT-LICENSES.md, and the complete OFL text ships as assets/fonts/OFL.txt.
插件代码与图标为 MIT(LICENSE)。内置字体为 SIL Open Font License 1.1,版权、来源、修改说明与再分发要求见 FONT-LICENSES.md,完整 OFL 文本随字体文件一起位于 assets/fonts/OFL.txt。
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10172
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10172
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 7101
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 6959
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 4959
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
Devin-AXIS/deepseek-design#deepseek-idesign★ 1744
可视化设计工作室,支持网站、App 原型、海报、信息卡、报告和杂志的模板创建、元素编辑、选区级 AI 草稿衔接与导出。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。