dsh-fonttune 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.en.md +24 -0
- package/CHANGELOG.md +24 -0
- package/README.en.md +14 -3
- package/README.md +14 -3
- package/docs/card-shaping.jpg +0 -0
- package/docs/panel.jpg +0 -0
- package/lib/client.js +1299 -43
- package/lib/index.js +38 -0
- package/lib/shared.cjs +445 -10
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +4 -2
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **dsh-fonttune** are documented here. Chinese version: [CHANGELOG.md](CHANGELOG.md).
|
|
4
4
|
|
|
5
|
+
## [0.6.0] - 2026-10-15
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **Conversation type shaping**: tracking, word spacing, paragraph spacing and first-line indent are now adjustable, together with a strict line-breaking switch; 0 keeps DSH's own values for all four, and the paragraph gap moves only the space between paragraphs while headings keep their own.
|
|
9
|
+
- **The floating panel carries every conversation adjustment**: a new "in force" section names the fonts the conversation, the interface and code actually render with, plus the weight slider's step count, and it folds away.
|
|
10
|
+
- **Descriptions and docs**: the plugin description and both READMEs cover the new shaping, and the README gained interface screenshots.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **The first-line indent reached headings, lists and code**: headings were indented along with the text, an ordered list's number stopped lining up with its item, and inline code gained leading space; it now applies to paragraphs only.
|
|
14
|
+
- **The floating panel kept a blank area after folding**: when the panel had been made taller, folding left that space behind; the panel now shrinks with its content, and still scrolls when it is made short.
|
|
15
|
+
|
|
16
|
+
## [0.5.0] - 2026-10-13
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Finer weight steps on fonts with a continuous weight range**: for a font that supports one, the weight slider of the conversation, the interface and code goes from a handful of steps to a couple of dozen, and every notch changes the text. Machines whose fonts do not support it keep the steps they had.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **Headings shrank when the conversation line height was adjusted**: the axis now moves the spacing alone, leaving the size and the hierarchy of headings and body text untouched.
|
|
23
|
+
- **The floating panel offered different weight steps than the settings card**: both now read and write the same steps and the same range.
|
|
24
|
+
- **The preview box did not match the real conversation**: moving the weight by one step now shows in the preview as well.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **The weight hints no longer describe a change of face per step**: on a font with a continuous weight range that is not what happens, so they now say every notch makes the text a little bolder or lighter.
|
|
28
|
+
|
|
5
29
|
## [0.4.2] - 2026-10-12
|
|
6
30
|
|
|
7
31
|
### Changed
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
**dsh-fonttune** 的重要变更都记录在这里。英文版见 [CHANGELOG.en.md](CHANGELOG.en.md)。
|
|
4
4
|
|
|
5
|
+
## [0.6.0] - 2026-10-15
|
|
6
|
+
|
|
7
|
+
### 变更
|
|
8
|
+
- **对话文字排印**:新增字距、词距、段距与首行缩进四项调整,以及「严格避头尾」开关;四项都以 0 表示保持 DSH 原样,段距只改变段落之间的间隔,标题各自保持原样。
|
|
9
|
+
- **悬浮调参面板放下对话的全部调整项**:底部新增「当前生效」一栏,写出对话、界面与代码三处实际在用的字体,以及字重滑块的档数;这一栏可以收起。
|
|
10
|
+
- **说明与展示**:插件描述与两份 README 补充了文字排印,README 新增界面截图。
|
|
11
|
+
|
|
12
|
+
### 修复
|
|
13
|
+
- **首行缩进影响标题、列表与代码**:开启后标题会跟着缩进,有序列表的序号与文字错位,行内代码前面会多出空白;现在只作用于段落。
|
|
14
|
+
- **调参面板收起「当前生效」后留有空白**:面板曾被拉高时,收起后原处会空出一块;现在面板随内容收缩,被压到较矮时仍可滚动查看全部调整项。
|
|
15
|
+
|
|
16
|
+
## [0.5.0] - 2026-10-13
|
|
17
|
+
|
|
18
|
+
### 新增
|
|
19
|
+
- **字重滑块在无级字重的字体上更细**:字体本身支持无级字重时,对话、界面、代码三处的字重滑块从原来的几档变为二十几档,每挪一格文字都有变化;字体不支持的机器上档位与之前相同。
|
|
20
|
+
|
|
21
|
+
### 修复
|
|
22
|
+
- **调整对话行高时标题字号变小**:现在只改变行距,标题与正文的字号与层级保持不变。
|
|
23
|
+
- **浮动面板的字重档位与设置页不一致**:两处显示与写入的档位、范围现在相同。
|
|
24
|
+
- **预览框与真实对话的字体表现不一致**:预览里挪动字重看不出变化的问题不再出现。
|
|
25
|
+
|
|
26
|
+
### 变更
|
|
27
|
+
- **字重提示文字不再描述"每一格都换一张字形"**:在无级字重的字体上这句话不成立,改为说明每挪一格文字都会变粗或变细。
|
|
28
|
+
|
|
5
29
|
## [0.4.2] - 2026-10-12
|
|
6
30
|
|
|
7
31
|
### 变更
|
package/README.en.md
CHANGED
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
> [中文](README.md) | **English**
|
|
4
4
|
|
|
5
|
-
**Font plugin for DeepSeek Harness (DSH)**: the **conversation** (markdown prose) gets full typographic control — font, size, line height, weight; the **interface** (settings sheet, sidebars, workspace, buttons) takes a font and a weight and **follows the conversation by default**; **code** stays its own axis with ligature and feature switches; and whole setups can be saved as **presets**. Everything lives in this plugin's native card (collapsed sections with summaries) and applies immediately: on the 0.2 line it is on the Plugins page under **Installed** (open this plugin's card), on the rc line under **Settings → Plugins → Plugin configuration**.
|
|
5
|
+
**Font plugin for DeepSeek Harness (DSH)**: the **conversation** (markdown prose) gets full typographic control — font, size, line height, weight, tracking, word gap, paragraph gap and first-line indent; the **interface** (settings sheet, sidebars, workspace, buttons) takes a font and a weight and **follows the conversation by default**; **code** stays its own axis with ligature and feature switches; and whole setups can be saved as **presets**. Everything lives in this plugin's native card (collapsed sections with summaries) and applies immediately: on the 0.2 line it is on the Plugins page under **Installed** (open this plugin's card), on the rc line under **Settings → Plugins → Plugin configuration**.
|
|
6
|
+
|
|
7
|
+
## The interface
|
|
8
|
+
|
|
9
|
+
The floating tuning panel (left, with its "in force right now" readout) and the text-shaping part of the settings card (right):
|
|
10
|
+
|
|
11
|
+
| Floating panel | Settings card |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
|  |  |
|
|
6
14
|
|
|
7
15
|
## Features
|
|
8
16
|
|
|
9
17
|
- **Three typography sets** — the conversation (markdown paragraphs, tables, headings) comes first and owns every axis; the interface (settings sheet, sidebars, workspace, headings and buttons) offers **a font and a weight** and follows the conversation by default (switchable); code stays its own axis
|
|
10
|
-
- **A floating tuning panel** — the dot in the conversation's corner unfolds into a card
|
|
18
|
+
- **A floating tuning panel** — the dot in the conversation's corner unfolds into a card carrying every conversation adjustment (font size, line height, weight, tracking, word gap, paragraph gap and first-line indent); the dot snaps to the conversation region's corners and unfolds from its own, the panel remembers its size and position; the button on its top right takes you to this plugin's own settings page; an **"in force" section** at the bottom names the fonts the conversation, the interface and code actually render with, plus the weight slider's step count (marked as fine steps when a variable font is in play) — it folds away, and the panel scrolls when it is made short; the panel can be turned off entirely from the settings page (the dot is gone for good); the unfold and fold animations ignore the system's "reduce motion" setting
|
|
11
19
|
- **Interface / conversation / code fonts** — three independent fallback lists, Latin families first and CJK after; leaving one empty keeps DSH's own stack untouched
|
|
12
20
|
- **Font-size offsets** — the **conversation** takes -3 ~ +6 px on top of DSH's own "conversation font size" (the official value is the base), moving paragraphs, headings and line heights together — and it is applied **once, at the source** (H1/H2/H3 all derive from the same delta, so the hierarchy holds at any offset and no heading comes out smaller than expected); code is its own axis at -3 ~ +6 px. **The interface has no size axis**: verified against DSH, the settings sheet, sidebars and workspace size their text in upstream CSS, and the only official size hook is the conversation one
|
|
13
21
|
- **Font-weight offsets** — the **conversation**, the **interface** and **code** all take the same **relative offset** (unset reads 0, the readout is signed, and the range is measured for the current font): the offset is added to each element's **own** weight, so the heading hierarchy DSH ships (h1~h3 700, h4~h6 and bold 600, table head 500, body 400) survives in both directions — headings stay clearly bolder than body text at any setting, and bold text inside a code surface stays bold. The interface offset is one rule over `body` plus an element table, with the whole conversation markdown subtree excluded: measured against computed styles on a live page, it takes every interface text element to the target and moves nothing inside the markdown subtree, so **changing the interface weight never touches the conversation**. The slider **counts steps**: the readout is the step count (for example `-1 0 +1`) and **the font decides how many there are** — the card measures how many distinct weights the chosen family can render for body text, and one step is the smallest jump that is **clearly visible** rather than the smallest possible one, the range ending where body text stops swapping faces (bold text and headings stop once they are at their heaviest) — so the control may offer fewer positions than before while every notch is a visible change and the numbers stay small. What is stored is still a weight offset (older values are converted), so changing the font never breaks a setting; a family with only regular and bold offers two positions in total, and continuous control needs a family with more weights or a variable font
|
|
14
22
|
- **Line heights** — the **conversation** uses a ratio (100% ~ 160%), code an additive offset (-4 ~ +8 px); the interface has no line-height axis, for the same reason as size
|
|
23
|
+
- **Text shaping (conversation)** — four axes that move the shape of the text rather than its face, each added on top of what DSH already ships: **tracking** (-0.4 ~ +2 px, positive opens the text up, negative tightens it), **word gap** (-1 ~ +4 px, Latin word gaps only), **paragraph gap** (-8 ~ +24 px on top of DSH's own paragraph spacing, headings untouched) and **first-line indent** (0 ~ +4 em, the usual Chinese convention), plus a **strict line breaking** switch that keeps Chinese punctuation and small kana off the start of a line. Every one of them treats 0 as "leave DSH alone" and injects **not a single byte** when it is off, and all of them travel with a preset. **Two things are deliberately missing**: automatic CJK-Latin spacing and punctuation hanging — this machine's Chromium does not support the CSS properties behind them, and a switch that does nothing when pressed is worse than saying so
|
|
15
24
|
- **Code ligatures** — a three-mode switch (default / on / off; browsers enable them by default, turning them off restores `=>` and `!=` as plain characters), plus an advanced `font-feature-settings` value field
|
|
16
25
|
- **Text rendering** — three modes: follow the system (default) / sharp / smooth. The same face draws with a different stroke feel — sharp is crisp and firm, smooth is soft and even
|
|
17
26
|
- **Refuse synthetic styles** (off by default, i.e. synthesis is allowed) — turning it on stops the browser from faking italic and bold for CJK faces, which have neither, so marked text stays upright; left off, the browser synthesises by its own rules, which at least gives a visible "bold" step for a family with no bold face
|
|
@@ -28,7 +37,9 @@
|
|
|
28
37
|
|
|
29
38
|
| Plugin version | Supported DSH versions |
|
|
30
39
|
| --- | --- |
|
|
31
|
-
| **0.
|
|
40
|
+
| **0.6.x** (latest, 0.6.0) | 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-alpha.1, 0.2.1-alpha.2 |
|
|
41
|
+
| 0.5.x (0.5.0) | 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-alpha.1, 0.2.1-alpha.2 |
|
|
42
|
+
| 0.4.x (0.4.2) | 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-alpha.1, 0.2.1-alpha.2 |
|
|
32
43
|
| 0.3.x (0.3.6) | 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2 |
|
|
33
44
|
| 0.2.x (0.2.8) | 0.1.5-rc.3, 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1, 0.1.7-rc.2 |
|
|
34
45
|
|
package/README.md
CHANGED
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](README.en.md) | **中文**
|
|
4
4
|
|
|
5
|
-
**DeepSeek Harness(DSH)字体插件**:**对话**(会话 Markdown
|
|
5
|
+
**DeepSeek Harness(DSH)字体插件**:**对话**(会话 Markdown 正文)拥有完整的排印控制——字体族、字号、行高、字重、字距、词距、段距与首行缩进;**界面**(设置页、侧栏、工作区、按钮)提供字体与字重并**默认跟随对话**;**代码**独立成轴,另有连字与特性开关;整套配置可存为**预设方案**。配置入口是**原生卡片**(分区收起 + 摘要),改完即时生效:0.2 线在「插件」页的**已安装**栏目里(点开本插件的卡片),rc 线在 设置 → 插件 → 插件配置。
|
|
6
|
+
|
|
7
|
+
## 界面
|
|
8
|
+
|
|
9
|
+
悬浮调参面板(左,含底部「当前生效」读数)与设置卡片里的文字排印部分(右):
|
|
10
|
+
|
|
11
|
+
| 悬浮面板 | 设置卡片 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
|  |  |
|
|
6
14
|
|
|
7
15
|
## 功能
|
|
8
16
|
|
|
9
17
|
- **三套排印**:对话(会话 Markdown 正文、表格与标题)排在第一位、拥有全部轴;界面(设置页、侧栏、工作区与标题按钮)提供**字体与字重**、默认跟随对话(可关);代码独立成轴
|
|
10
|
-
- **悬浮调参面板** ——
|
|
18
|
+
- **悬浮调参面板** —— 对话角落的小圆点展开为卡片,对话的调整项全部在这里(字号、行高、字重、字距、词距、段距、首行缩进);小圆点吸附在对话区域的四角、展开方向随所在角落,面板大小与位置自动记住;面板右上角有直达本插件设置页的按钮,底部**「当前生效」一栏**写出本页实际在用的对话、界面与代码三处字体和字重滑块的档数(连续字重生效时标注「细档」),这一栏可收起,面板被压矮时可滚动查看;设置页里可把面板整体关闭(小圆点彻底隐藏);展开与收起动画不受系统「减少动效」设置影响
|
|
11
19
|
- **界面 / 对话 / 代码字体** —— 各自独立的字体回退列表,拉丁字体在前、中文字体在后;留空表示完全沿用 DSH 的字体栈
|
|
12
20
|
- **字号偏移** —— **对话**字号 -3 ~ +6 px,加在 DSH 自己的「对话字号」之上(官方数值是基准),段落、标题与行高一起跟随,且**只在源头加一次**(H1/H2/H3 的尺寸都由同一条 delta 派生,任意偏移下层级都不变、也不会出现某个标题偏小);代码字号独立成轴,-3 ~ +6 px。**界面没有字号轴**:经实测 DSH 的设置页、侧栏与工作区把字号写死在上游 CSS 里,唯一官方字号接口就是「对话字号」
|
|
13
21
|
- **字重偏移** —— **对话、界面与代码都是同一种相对偏移**(未设置即 0、读数按 `+n` / `-n` 显示,范围按当前字体实测):偏移叠加在每个元素**自身的**字重上,标题仍按 DSH 的层级(h1~h3 700、h4~h6 与加粗 600、表头 500、正文 400)逐级保持"标题明显粗于正文",调重调轻都不会把层级抹平,代码块里的粗体也不会被压平。界面偏移是一条把对话 Markdown 整棵子树排除在外、只铺 `body` 与自带字重的元素表的规则:真机实测(活页面计算样式)它把界面的文本元素改到目标值、对话 markdown 里的元素一个都没动,所以**改界面字重不会碰到对话**。滑块**按档计数**:读数就是档数(例如 `-1 0 +1`),**档数由字体决定**——卡片会在页面里量出所选字体在正文处实际能渲染出几种粗细,一档取**变化足够明显**的那一档(不是最细的那一档),范围到正文再也换不到字形为止(加粗与标题到顶后停住),所以档数可能比之前少,但每挪一格都看得出来,数字也不会出现"几百几百";换字体会重新测量。文档里存的仍是字重偏移(旧值自动换算),换字体不会把设置改坏;字体只有常规与粗体两档时就只有 2 个档位,要连续可选用字重档位多的字体或可变字体
|
|
14
22
|
- **行高** —— **对话**行高用倍率(100% ~ 160%);代码行高用加法偏移(-4 ~ +8 px)。界面没有行高轴(同字号的原因)
|
|
23
|
+
- **文字排印(对话)** —— 四条叠加在 DSH 原有排版之上的轴,改的是文字的形状而不是字体本身:**字距**(-0.4 ~ +2 px,正值更疏、负值更紧)、**词距**(-1 ~ +4 px,只影响西文词间空隙)、**段距**(-8 ~ +24 px,加在 DSH 自己的段落间距上,标题间距不受影响)、**首行缩进**(0 ~ +4 em,中文排版的常规做法),以及**严格避头尾**开关(换行时不让中文标点、小假名等出现在行首)。四条轴都以 0 为「保持 DSH 原样」,关闭时**一个字节都不注入**;四项都进预设方案,可随方案带走。**未做的两项**:中西文自动间距与标点悬挂——本机浏览器(Chromium)尚不支持对应的 CSS 属性,与其放一个按下去没反应的开关,不如说明白
|
|
15
24
|
- **代码连字** —— 三档开关(默认 / 开启 / 关闭,浏览器默认即开启,关闭可还原 `=>`、`!=` 这类连字),高级模式另有 `font-feature-settings` 特性值输入
|
|
16
25
|
- **文字渲染质感** —— 三档:跟随系统(默认)/ 锐利 / 圆润。同一副字体在不同渲染方式下笔画质感不同,锐利更清晰硬朗、圆润更柔和均匀
|
|
17
26
|
- **拒绝合成样式**(默认关闭 = 允许合成) —— 打开后禁用浏览器为中文伪造的斜体与粗体(中文字体没有斜体字形,浏览器会硬掰);关着(默认)时由浏览器按自己的规则合成,字体缺粗体字形时至少还能看出"粗体"这一档
|
|
@@ -28,7 +37,9 @@
|
|
|
28
37
|
|
|
29
38
|
| 插件版本 | 支持的 DSH 版本 |
|
|
30
39
|
| --- | --- |
|
|
31
|
-
| **0.
|
|
40
|
+
| **0.6.x**(最新,0.6.0) | 0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-alpha.1、0.2.1-alpha.2 |
|
|
41
|
+
| 0.5.x(0.5.0) | 0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-alpha.1、0.2.1-alpha.2 |
|
|
42
|
+
| 0.4.x(0.4.2) | 0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-alpha.1、0.2.1-alpha.2 |
|
|
32
43
|
| 0.3.x(0.3.6) | 0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2 |
|
|
33
44
|
| 0.2.x(0.2.8) | 0.1.5-rc.3、0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1、0.1.7-rc.2 |
|
|
34
45
|
|
|
Binary file
|
package/docs/panel.jpg
ADDED
|
Binary file
|