Skip to main content

dsh-font

9Stars2Forks1Issues0Watchers

A plugin to switch fonts in DSH Web GUI: 99 interface fonts + 31 code fonts, Chinese-Western font pairing with fallback stack, takes effect immediately and persists via localStorage.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
Branch
main
dsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add github:tianyhjg-lab/dsh-font

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin tianyhjg-lab/dsh-font for me: review the repository at https://github.com/tianyhjg-lab/dsh-font first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Sentence Description

A plugin to change fonts in DSH Web GUI: 99 interface fonts (including Chinese and English Songti/Kaiti/Calligraphic/Display) and 31 monospace code fonts, each option rendered in real-time with its respective font in the dropdown, effective immediately globally, persists after refresh.

Core Features

  • Switch interface font: Select one in "Settings → General → Font", applies to the entire Web interface body text, buttons, sidebar, titles, menus
  • Switch code font: Select separately to override code blocks, terminal, JSON tree, diff and all monospace scenarios
  • 99 interface fonts grouped: Chinese Heiti / Chinese Songti / Chinese Kaiti Fangti / Chinese Calligraphic Creative / Western Serif / Western Sans-Serif / Western Display Calligraphic, 7 groups total
  • 31 code font options: Cover Consolas, Cascadia Code, JetBrains Mono, Fira Code, Source Code Pro, Iosevka, Maple Mono and other common monospace
  • Chinese-Western font fallback stack: Selected Chinese font automatically pairs with a Western fallback, selected Western font automatically pairs with a Chinese fallback, mixed text looks natural
  • Instant effect: Global theme changes immediately after selection without page refresh
  • Persistent selection: Saved to localStorage, persists across sessions

Technical Implementation

  • Language: JavaScript (ESM entry + browser-side hand-written CJS bundle, zero build)
  • Key Dependencies: @deepseek-ai/dsh-client-runtime, @deepseek-ai/dsh-client-locale, react, @deepseek-ai/cordis (all peerDependencies)
  • Architecture Pattern: Cordis dual-end plugin — index.js is the host-side no-op loading entry, cordis.patch.yml injects a loader item with id=font; browser-side registers React component via window.__ModuleLoader__.load, registers setting row via slots.inject("settings.general.item"), registers Chinese/English dictionary via locale.register, finally implements global theme change by overriding the --dsw-font-family and --ds-font-family-code CSS variables on :root
  • Entry Files: index.js (host-side) + client.js (browser-side, contains all UI and style injection logic)

Use Cases

DSH Web users who want to replace default fonts to reduce eye strain from prolonged reading, make Chinese-English mixed text look better, or use a pre-installed brand font (like Source Han Sans, Xiangna Wenka, Deyi Black) to unify visual style; as well as heavy code users who want code blocks and terminal to use better monospace fonts like JetBrains Mono / Fira Code / Maple Mono.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DSH>=0.1.0-rc.6package.json#peerDependencies declares dependencies @deepseek-ai/dsh-client-runtime, @deepseek-ai/dsh-client-locale, @deepseek-ai/dsh-client-ui-slots all ^0.1.0-rc.6; @deepseek-ai/cordis ^4.0.1
Node.jsNot declaredpackage.json does not declare engines; scripts.check uses node --check, no build step
PlatformWebdsh.client.platform: "web", only injected to DSH Web GUI; desktop/mobile browsers also work, but underlying must be DSH Web
Native ModulesNoneDoes not bundle font files, does not download fonts, no native modules involved

Installation

dsh plugin --profile web add github:tianyhjg-lab/dsh-font

Configuration

This plugin requires no external config file; all selections are made within "Settings → General → Font" page. The setting row includes two dropdowns and a preview line:

ConfigTypeDescriptionDefault
Interface FontSingle choice (99 items)Applies to entire Web interface, affecting body text, buttons, sidebar, titles, menus; grouped by Chinese Heiti / Chinese Songti / Chinese Kaiti Fangti / Chinese Calligraphic Creative / Western Serif / Western Sans-Serif / Western Display CalligraphicDefault (DSH built-in)
Code FontSingle choice (31 items)Applies to all monospace scenarios (code blocks, terminal, JSON tree, diff)Default (DSH built-in)

Storage keys: Browser localStorage's dsh-font:ui (interface) and dsh-font:code (code); selecting "Default" clears the corresponding key. Automatically falls back to default when recognizing invalid values.

FAQ

Q: Where are the font options after installation?

A: Open "Settings → General", and a "Font" row will appear at the bottom. Interface font 99 to 1, code font 31 to 1, each item in the dropdown is rendered in its respective font, with a real-time preview bar below.

Q: Do I need to install font files on my machine?

A: Yes. The plugin does not bundle or download any fonts; the font-family list is just names. If the computer doesn't have the selected font, the browser will automatically fall back to the next item in the stack, so selecting a non-existent font won't cause errors—it just looks no different than not changing it.

Q: Will the selection be remembered? Will it be lost if I switch browsers or clear cache?

A: The selection is saved in browser localStorage (dsh-font:ui and dsh-font:code), persists across same-origin refreshes/restarts. It will be lost when switching browsers, clearing cache, or changing domain—requiring a re-selection.

Q: How to restore default fonts?

A: Simply select "Default" for both interface font and code font in settings; the injected styles will be cleared, reverting to DSH built-in fonts.

Q: Are there licensing issues for commercial use of these fonts?

A: The plugin itself does not include any font files, but users must confirm font usage licensing themselves (especially for commercial use). Source/Xiangna/Sarsa etc. OFL/Apache open source can be reused; Founder/HY/HT etc. come with system license, commercial use requires self-evaluation.

Q: How to uninstall?

A: Remove dependency and profile bundle registration, then restart dsh web. The injected <style> element will be cleaned up with plugin uninstallation, leaving no residue.

Q: Can't see the "Font" row, what to do?

A: Check if installed to web profile, whether in "Settings → General" page bottom, and confirm dsh web has been restarted; if still not present, check browser console for module loading errors.

Difficulty Level

Beginner — ready to use after installation, no documentation reading or config writing needed, just open settings and select fonts from dropdown.

Known Issues and Limitations

  • Only references locally installed fonts: Uninstalled fonts automatically fall back to the fallback stack; rendering won't fail but visual result differs from expectation; users need to install corresponding font files themselves for accurate effect
  • Selection stored in browser local: localStorage is same-origin limited; switching browsers/domains or clearing cache will lose selection, not synced with DSH main account configuration
  • Does not bundle any font files: files array only contains index.js / client.js / cordis.patch.yml / README.md; plugin package is extremely small but the tradeoff is users must solve font sourcing themselves
  • Only supports Web GUI: dsh.client.platform locked to web, desktop and headless clients won't take effect
  • Font commercial licensing requires user self-check: System/Office fonts like Founder, HY, HT, Microsoft YaHei are not licensed with the plugin; commercial use requires user self-evaluation

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/tianyhjg-lab/dsh-font)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory