DeepSeek Harness (DSH) provides a command-line environment for agent development. Its Web UI default font may not meet all developers’ reading preferences when rendering mixed Chinese-English text or code. The dsh-custom-fonts plugin injects global styles, allowing you to adjust the interface font, code font, and global font size directly on the settings page without restarting the process.

Plugin Positioning

This is a pure client-side plugin developed by maintainer lsh2002. After installation, a “Fonts” page is added to the DSH Web interface settings, providing configuration options for Chinese/English UI fonts, code fonts, and font size offset. All changes take effect immediately without a restart.

Core Features

  1. Settings Entry: Adds a Fonts page under Settings, providing a visual configuration interface.
  2. Font Customization:
    • UI Font · English: Used for Latin characters.
    • UI Font · Chinese: Used for Chinese characters.
    • Code font: Used for code blocks and inline code.
  3. Font Size Offset: Provides a global slider from -4 to +8 px. The plugin uses relative calculation (calc(1em + Npx)) to keep base text clear and prevent layout breakage.
  4. Real-Time Preview: The settings page displays mixed Chinese-English UI examples and code font rendering results, supporting comma-separated font lists or free-form font names.
  5. Reset: Clears all injected styles with one click and restores defaults.

Installation and Activation

Install through DSH’s plugin command line; after installation, refresh the page to activate it. No host restart is required.

dsh plugin --profile web add dsh-custom-fonts

Or install directly from the repository:

dsh plugin --profile web add github:lsh2002/dsh-custom-fonts

How It Works

The plugin injects a global CSS stylesheet to control fonts and font size.

The font stack uses a standard script-separation strategy: English characters preferentially match the specified English font, while Chinese characters not included in the English font automatically fall back to the specified Chinese font, without complex DOM logic or language detection.

Font size offset is computed relatively with calc(1em + Npx), meaning each element adds N pixels on top of its own size. This keeps size changes consistent and precise across multi-level nested elements.

Changes are applied globally and immediately, covering all areas such as message bodies, sidebars, and input boxes.

Notes

  • This is a pure client-side plugin and contains no host-side logic.
  • Changes directly override the browser’s default rendered fonts. It is recommended to record the default configuration before adjusting so you can reset it later.
  • Code fonts and UI fonts are configured independently, allowing different monospace fonts to be selected as needed.

Summary

dsh-custom-fonts solves the inflexible font configuration issue in the DSH Web UI. Through client-side style injection, it provides a low-intrusion, zero-restart solution that lets developers customize the visual experience of the interface based on personal preference or specific scenarios, such as code development.

  • GitHub repository: https://github.com/lsh2002/dsh-custom-fonts