跳过主要内容
F

dsh-xp-pixel-font

fukewang/dsh-xp-pixel-font

内置开源 12px 点阵字体,只在 XP Luna 主题启用时套用,让各平台的 XP 点阵文字一致。它的 HTTP 路由没有 DSH 的访问检查,浏览器里打开的网页可以调用它们。

安装

dsh plugin --profile web add github:fukewang/dsh-xp-pixel-font

README

XP pixel font

Keeps the Windows XP text look identical on Windows, macOS and Linux by bundling a real 12 px pixel font and using it only while the XP Luna theme is active.

XP UI with the bundled pixel font

Why

The XP Luna theme does not ship a font; it prepends system font names (Tahoma, SimSun, WenQuanYi Zen Hei Sharp, ...) to the host text stack. Linux often lands on a bitmap face, but Windows has Tahoma and SimSun and Edge renders them with ClearType outlines, so the text looks smooth and modern there. This plugin removes that dependency on installed fonts.

What it does

  • Bundles Fusion Pixel 12px Proportional (SIL OFL 1.1) and serves it from /plugin/xp-pixel-font/font.woff2.
  • Injects an @font-face and puts that face first in --dsh-font-family-text while the XP Luna theme's <style data-xp-luna> element is present.
  • When the theme is disabled, or the host switches to dark mode (the theme removes its stylesheet), the override and the font face disappear immediately. Other themes are never affected.
  • Code blocks and the terminal keep their own font variables.

Install

dsh plugin --profile web add dsh-xp-pixel-font

Requires the XP Luna theme plugin to be installed and active. The override is gated on that theme's style marker, so this plugin does nothing without it.

Font license

Fusion Pixel Font, Copyright (c) 2022 TakWolf (https://takwolf.com), SIL Open Font License 1.1. The full license ships as LICENSE-OFL.txt and is served at /plugin/xp-pixel-font/license. The code of this plugin is MIT.

Limits

  • The face is designed on a 12 px grid; other sizes still look pixel-styled but only exact 12 px stays perfectly crisp.
  • Windows fractional display scaling (125%/150%) softens pixel edges; 100% scaling is crispest.

相关插件