DeepSeek Harness Font Plugin: Separate Chinese and Latin Fonts; Independent UI / Content / Code

Preface

The official settings of DeepSeek Harness (DSH) only include font size and color schemes, lacking an entry for font family. Existing third-party font plugins typically modify --dsw-font-family uniformly, making the interface and body fonts inseparable. dsh-font-master aims to split font control into three dimensions: script type (Chinese/Western) and usage (interface/content/code), meeting layout needs across different scenarios.

Core Features

The plugin provides the following capabilities:

  • Separate specification for Chinese and Western scripts: Latin letters use Western fonts, while Chinese characters use Chinese fonts, without interfering with each other.
  • Independence across interface, content, and code: The sidebar shell, conversation body, and code blocks have their fonts set independently.
  • Read local font files: Generates a menu listing fonts installed on the host machine, supporting search by both Chinese and English names.
  • Follow interface font: Content fonts can directly inherit the interface font settings.
  • Token-based override: Does not rely on language detection and performs no DOM surgery; leaving the Chinese font blank will not cause Chinese characters to disappear.

Installation and Activation

Install the plugin using the official CLI:

dsh plugin --profile desktop add github:AnAcretiondisk9986/dsh-font-master

A DSH restart is required after installation to take effect.

Typical Usage

  1. Open the settings menu and navigate to “Fonts”.
  2. There are 6 slots, divided into 3 usages (interface, content, code) × 2 script types (Western, Chinese).
  3. Grouped by Chinese, monospace, and Western fonts, with support for search by Chinese and English names.
  4. Click the “Follow interface font” switch to make the content font directly inherit the interface font settings.

Technical Implementation

The plugin achieves control by overriding DSH’s CSS variables, without involving DOM operations:

  • Interface font: Overrides --dsw-font-family.
  • Content font: Overrides the --dsw-font-markdown-* series of variables.
  • Code font: Overrides --ds-font-family-code.
  • User messages: Achieved by matching the class*="plainRun" selector.

The host side scans system font directories (e.g., %WINDIR%\Fonts on Windows), reads the font family names from the sfnt structure, and generates a list for the browser side to call.

Notes

  • DSH must be restarted after installation to take effect.
  • If the local font list cannot be read (e.g., route rejected), the plugin will fall back to the built-in candidate list, and the menu remains usable.
  • The plugin does not rely on language detection; leaving the Chinese font blank will not cause Chinese characters to disappear.

Conclusion

This plugin solves the issue of overly coarse font configuration granularity in the DSH environment through independent variable overrides and local font scanning.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye