dsh-font
Verified@klarkxy/dsh-font · v0.1.0 · SEE LICENSE IN LICENSE · Web UI
Font: customize the interface font, code font, and conversation font size of the DeepSeek Harness Web GUI.
Install
dsh plugin add @klarkxy/dsh-font Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Tags
Readme
@klarkxy/dsh-font
Font: customize the interface font, code font, and conversation font size of the DeepSeek Harness Web GUI from one settings panel.
What it does
The plugin adds a settings panel to its bundle page in the Plugins view:
- Interface font — the typeface of all interface text. Pick a preset (Microsoft YaHei, PingFang SC, SimSun, KaiTi, Source Han Sans/Serif), pick an actually-installed family via Load system fonts, or enter any CSS
font-familystack. Empty restores the host default. - Code font — the monospace typeface of code blocks, inline code and terminals. Presets include Cascadia, JetBrains Mono, Fira Code, Consolas, Sarasa Mono and Maple Mono; system fonts and custom stacks are accepted too.
- Conversation font size — 10–22 px, driven through the official
ctx.theme.setFontSize()entry. It stays in sync with the native stepper in Settings → General and persists through the host settings scope.
Load system fonts uses the Local Font Access API (window.queryLocalFonts()): Chromium-only and gated behind a browser permission prompt. Every click re-enumerates — after the first read the button relabels to Reload system fonts, so fonts installed later appear on the next click. Each entry commits the exact family name CSS needs, while the label leads with the name the UI locale recognizes — a converted font shows as 华康少女文字W5(P)(DFPShaoNvW5-GB) in Chinese and DFPShaoNvW5-GB(华康少女文字W5(P)) in English. Where the API is unavailable or denied (Firefox, Safari, Electron policy), the panel simply keeps the preset + manual-input flow. No font files are bundled — every choice is rendered with fonts already installed on the machine, falling back through the stack when a family is missing.
Changes apply immediately through owned inline overrides on <html> for the host's :root font tokens (--dsw-font-family, --ds-font-family-code). Derived Markdown, brand, and terminal fonts follow them. Choosing Default or unloading restores prior inline values without removing another owner's later updates.
Where settings live
Font choices keep the existing browser localStorage key and format. Each browser and machine has its own installed fonts, so this plugin's font choices remain browser-local. Font preferences live in the browser's localStorage, so they must be set again after switching browser, domain or port. The font size needs no local copy: the theme service persists it host-side through setFontSize(px).
The host half is intentionally empty: no Host service, no RPC, no model calls.
Install
Requires DSH 0.2.0-rc.2 or later:
dsh plugin --profile web add @klarkxy/dsh-font
Replace web with your profile name and restart the profile (or reload the page) after installing. Open Plugins → Font to change fonts.