dsh-fonttune 0.3.2 → 0.3.4

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 CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to **dsh-fonttune** are documented here. Chinese version: [CHANGELOG.md](CHANGELOG.md).
4
4
 
5
+ ## [0.3.4] - 2026-09-29
6
+
7
+ ### Fixed
8
+ - **A slider quietly fell back to the document's value when the value never reached the document**: when a write was accepted but the document's value never followed, the slider jumped back after a moment with nothing to show for it. The control now says so underneath, and says the value came from the document.
9
+
10
+ ### Changed
11
+ - **The weight hints name the smallest step**: the step is measured for the current font, and its smallest step is a small change by nature — the hints now say so.
12
+ - **The faux bold and faux italic switches say what they actually do**: turning faux bold off adds at most one extra step for a font that ships no bold face and cannot invent the middle ones; turning both off is the same story.
13
+ - **The follow hint is clearer**: while the interface follows the conversation, the interface section's own font and weight are ignored.
14
+
15
+ ## [0.3.3] - 2026-09-28
16
+
17
+ ### Changed
18
+ - **The supported DSH floor moved up**: 0.1.5-rc.3 is no longer supported, so upgrade to the 0.1.7 line first; 0.1.7 and 0.2.0-rc.1 stay supported.
19
+
5
20
  ## [0.3.2] - 2026-09-28
6
21
 
7
22
  ### Changed
@@ -11,7 +26,7 @@ All notable changes to **dsh-fonttune** are documented here. Chinese version: [C
11
26
 
12
27
  ### Fixed
13
28
  - **The upper positions of the weight slider jumped to a lower number**: two of them were read as an absolute weight and converted, so the third step showed as −1 and the fourth rendered exactly like 0. A position now stays where it is put.
14
- - **With the conversation weight at 0, the conversation still picked up the interface offset**: the two axes shared a range, so 0 carried the interface's offset as well and the 0 and +1 positions looked nearly the same. Each axis now keeps to its own scope, and 0 is DSH's own weight.
29
+ - **With the conversation weight at 0, the conversation still picked up the interface offset**: the two axes shared a range, so 0 carried the interface's offset as well and the 0 and +1 positions looked nearly the same. Each axis now keeps to its own scope, and 0 is DSH's own weight.
15
30
  - **The line-height preview in the card was taller at 100% than at the notches above it**: the preview and the conversation did not share a base. They do now, so every notch is taller in the preview as well.
16
31
 
17
32
  ### Changed
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  **dsh-fonttune** 的重要变更都记录在这里。英文版见 [CHANGELOG.en.md](CHANGELOG.en.md)。
4
4
 
5
+ ## [0.3.4] - 2026-09-29
6
+
7
+ ### 修复
8
+ - **取值没落进文档时,滑块会安静地回到文档里的值**:写入被接受、文档里的值却没有跟着变时,滑块过一会儿自己跳回,看不出发生过什么。现在会在控件下方给出提示,说明已回到文档里的值。
9
+
10
+ ### 变更
11
+ - **字重说明写明最小的一档看起来最弱**:档距按当前字体实测,最小的一档变化幅度本来就小,说明里现在写清了这一点。
12
+ - **伪粗体与伪斜体开关写明了实际效果**:关掉「禁用伪粗体」最多为没有粗体字形的字体多出一档,变不出中间档;两个开关一起关时同理。
13
+ - **界面跟随的说明更明确**:跟随开启时,界面分区自己的字体与字重会被忽略。
14
+
15
+ ## [0.3.3] - 2026-09-28
16
+
17
+ ### 变更
18
+ - **支持的 DSH 版本下限提高**:不再支持 0.1.5-rc.3,请先升级到 0.1.7 线;0.1.7 与 0.2.0-rc.1 继续支持。
19
+
5
20
  ## [0.3.2] - 2026-09-28
6
21
 
7
22
  ### 变更
@@ -11,7 +26,7 @@
11
26
 
12
27
  ### 修复
13
28
  - **字重滑块偏上的档位会跳到较小的数值**:此前有两个档位会被换算成别的数值,表现为拖到第三档显示成 −1、第四档与 0 档的粗细看起来完全一样。现在拖到哪一档就停在哪一档。
14
- - **「对话字重偏移」为 0 时,对话还是会跟着「界面字重偏移」一起变粗**:两个轴的范围互相串了,界面设了偏移时对话的 0 档也带上了那个偏移,于是 0 与 +1 两档看起来几乎一样。现在每个轴只管自己的范围,0 档就是 DSH 原样。
29
+ - **「对话字重偏移」为 0 时,对话还是会跟着「界面字重偏移」一起变粗**:两个轴的范围互相串了,界面设了偏移时对话的 0 档也带上了那个偏移,于是 0 与 +1 两档看起来几乎一样。现在每个轴只管自己的范围,0 档就是 DSH 原样。
15
30
  - **卡片里的行高预览在 100% 时比更高的档位还高**:预览与真实对话用的不是同一个基准。现在两者一致,预览里也是每一档都更高。
16
31
 
17
32
  ### 变更
package/README.en.md CHANGED
@@ -14,7 +14,7 @@
14
14
  - **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
15
15
  - **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
16
16
  - **The interface-follows-conversation switch** — a "Follows the conversation" switch at the top of the interface section (on by default): on, the interface takes the conversation's **font and weight** and its own two controls stay hidden; off, it uses its own font and weight, independent of the conversation. Size and line height belong to the conversation only (the interface has no hooks for them)
17
- - **Presets** — a dropdown select right under the edit mode: five built-in presets out of the box, pick one to apply it; with a preset selected every change auto-saves into it, and "Rename / Export / Import" manage the list (export as JSON, import-merge a paste). When the clipboard is unavailable (a non-secure context, or no clipboard permission) the export does not print a truncated message: the whole JSON goes into a selected, read-only box, so the copy shortcut works, and the box puts itself away once copied. A settings write the document **refuses** is reported on the same row instead of leaving the control quietly showing the old value
17
+ - **Presets** — a dropdown select right under the edit mode: five built-in presets out of the box, pick one to apply it; with a preset selected every change auto-saves into it, and "Rename / Export / Import" manage the list (export as JSON, import-merge a paste). When the clipboard is unavailable (a non-secure context, or no clipboard permission) the export does not print a truncated message: the whole JSON goes into a selected, read-only box, so the copy shortcut works, and the box puts itself away once copied. A settings write the document **refuses** is reported on the same row instead of leaving the control quietly showing the old value, and a write the document never took says underneath that the value came from the document
18
18
  - **West / CJK split (simple mode)** — an edit-mode switch: simple mode gives just a Western and a CJK single-pick slot per set, advanced mode is the full stack editor; both views share one stack, so toggling never changes the order you set up
19
19
  - **Font picker panel** — four curated groups (monospace / CJK / Latin / generic), always listed — while searching and even when enumeration fails — plus an "installed on this machine" group on Chromium that lists only what the curated groups do not, so no family is ever offered twice. A name that is not in the list can be created with "use xxx". A refused font permission is retried after a while, so granting it in the browser and reopening the panel fills the list in
20
20
  - **Drag to reorder** — picked fonts are draggable chips with earlier/later buttons too (keyboard and touch friendly)
@@ -22,32 +22,14 @@
22
22
 
23
23
  ## Compatibility
24
24
 
25
- **One package serves four host lines** — 0.1.5-rc.3 (the floor), 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 / rc.2 and 0.2.0-rc.1 — and the install is the same on any of them: all three were verified for "the settings card opens, the stylesheet really reaches the page, and a change made in the card is written through".
25
+ **One package serves three host lines** — 0.1.7-alpha.1 / alpha.2 (the floor), 0.1.7-rc.1 / rc.2 and 0.2.0-rc.1 — and the install is the same on any of them: all three were verified for "the settings card opens, the stylesheet really reaches the page, and a change made in the card is written through".
26
26
 
27
27
  | Plugin version | Supported DSH versions |
28
28
  | --- | --- |
29
- | **0.3.2** (latest) | 0.1.5-rc.3, 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 / rc.2, 0.2.0-rc.1 |
30
- | 0.3.1 | 0.1.5-rc.3, 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 / rc.2 |
31
- | 0.3.0 | 0.1.5-rc.3, 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 / rc.2 |
32
- | 0.2.7 | 0.1.5-rc.3, 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 / rc.2 |
33
- | 0.2.6 | 0.1.5-rc.3, 0.1.7-alpha.1 / alpha.2, 0.1.7-rc.1 |
34
- | 0.2.5 | 0.1.5-rc.1 / rc.2 / rc.3, 0.1.7-alpha.1 / alpha.2 |
35
- | 0.2.4 | 0.1.5-rc.1 / rc.2 / rc.3, 0.1.7-alpha.1 / alpha.2 |
36
- | 0.2.3 | 0.1.5-rc.2 |
37
- | 0.2.2 | 0.1.5-rc.2 |
38
- | 0.2.1 | 0.1.5-rc.2 |
39
- | 0.2.0 | 0.1.5-rc.2 |
40
-
41
- `engines.dsh` is declared as **`>=0.1.5-rc.3 <0.1.7-0 || >=0.1.7-alpha.1 <0.3.0-0`** (a prerelease needs its own branch: node-semver admits one only when some comparator in the range sits on that version's exact `major.minor.patch` tuple and carries a prerelease tag of its own, so a plain `>=0.1.5-rc.3` never matches `0.1.7-alpha.1`). Every difference between the lines is settled at runtime rather than by version number:
42
-
43
- - **The settings service**: up to 0.1.5-rc.x it is `settingsScope.bind({namespace})` (by namespace); 0.1.7-alpha.x and 0.1.7-rc.x use `configForms.get(<profile entry id>)` (by entry id, which the installing profile decides — so the plugin claims the form whose served schema names its own fields). Both expose the same `getSnapshot`/`subscribe`/`set`/`unset` face, so one implementation covers them.
44
- - **The loader row id IS the settings key**: from 0.1.7-rc.1 on, settings are stored per entry id, and the first start imports the removed `settings.yaml` by matching section names against it — so the row id this package ships equals its settings namespace (`dsh-fonttune`). That same id also lets the package be installed through the profile's `dsh.profile.bundles`: the plugin manager then shows it as running while the configuration page stays reachable.
45
- - **The configuration card's seat**: 0.1.5-rc.x has a keyed cell under Settings → Plugins → Plugin configuration (`settings.plugin.item`); the 0.1.7 lines dropped that slot and instead contribute an entry to the Plugins page's official list (`plugins.item`, which is how the built-in settings pages are added there), plus a per-package page for a profile that installed this plugin as a bundle (`plugins.bundle.config`). All three are registered; the one a host never declares is inert. On those pages the card **starts open** — opening the entry is the expansion gesture, and asking for a second click is exactly what this release removed.
46
- - **The host half's config values**: once the alpha marks the schema `.volatile()`, the fields the host half receives are cosmokit volatile references (`{get(),[write]}`) rather than plain values, which left the first-frame stylesheet row empty; the references are unwrapped before use.
47
- - **`inject` declares only services all three lines have** (`slots`, `locale`): declaring one a host does not provide parks the whole package — on the alpha a declared `settingsScope` kept the entire Web UI from booting. The settings service is looked up with `ctx.get(name)` instead.
48
- - **The 0.1.7 form is addressed by entry id**: while the host's `describe()` view has not arrived, the plugin does not guess a name (a wrong guess means every write is refused) — it stands in with a pending scope, adopts the real form as soon as the view is served, and re-reads immediately.
49
-
50
- The market entry also states these requirements (`engines.dsh`, `dsh.compatibility.dshReleases` and `peerDependencies` in `package.json`), so the host a version needs can be checked before installing.
29
+ | **0.3.x** (latest, 0.3.4) | 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 |
30
+ | 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 |
31
+
32
+ Each major version lists only its newest patch: defects a feature introduced were fixed in the patches after it, so within a major version the newest patch is the one to use; older patches keep working, because the plugin does not break its existing interfaces.
51
33
 
52
34
  ## Install
53
35
 
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  - **代码连字** —— 三档开关(默认 / 开启 / 关闭,浏览器默认即开启,关闭可还原 `=>`、`!=` 这类连字),高级模式另有 `font-feature-settings` 特性值输入
15
15
  - **拒绝合成样式**(默认关闭 = 允许合成) —— 打开后禁用浏览器为中文伪造的斜体与粗体(中文字体没有斜体字形,浏览器会硬掰);关着(默认)时由浏览器按自己的规则合成,字体缺粗体字形时至少还能看出"粗体"这一档
16
16
  - **界面跟随对话开关** —— 界面分区顶部的「跟随对话设置」开关(默认开启):开启时界面沿用对话的**字体与字重**,界面自己的两个控件隐藏;关闭后界面用自己的字体与字重,与对话互不影响。字号与行高只属于对话(界面没有这两个接口)
17
- - **预设方案** —— 编辑模式正下方的下拉选择框:五个默认配置开箱即用,点开选一个即应用;选中方案后所有改动自动存入该方案,右侧「改名 / 导入 / 导出」管理方案(导出 JSON 分享、导入合并)。剪贴板不可用时(非安全上下文、或没有剪贴板权限)导出不会只给一段被截断的提示,而是把完整 JSON 放进一个已选中、只读的文本框,按复制快捷键即可,复制后自动收起;任何**写设置失败**(宿主拒绝、只读部署等)都会在当前行显示出来,而不是让控件悄悄弹回旧值
17
+ - **预设方案** —— 编辑模式正下方的下拉选择框:五个默认配置开箱即用,点开选一个即应用;选中方案后所有改动自动存入该方案,右侧「改名 / 导入 / 导出」管理方案(导出 JSON 分享、导入合并)。剪贴板不可用时(非安全上下文、或没有剪贴板权限)导出不会只给一段被截断的提示,而是把完整 JSON 放进一个已选中、只读的文本框,按复制快捷键即可,复制后自动收起;任何**写设置失败**(宿主拒绝、只读部署等)都会在当前行显示出来,而不是让控件悄悄弹回旧值;写入被接受、文档里的值却没有跟着变时,滑块也会在下方说明已回到文档里的值
18
18
  - **西文 / 中文分栏(简单模式)** —— 编辑模式开关:简单模式每套字体只给「西文」「中文」两个单选格,高级模式是完整的字体栈编辑器;两种模式共用同一条栈,来回切换不改动已排好的顺序
19
19
  - **选字体面板** —— 内置 等宽 / 中文(CJK)/ 拉丁 / 通用 四组预设,Chromium 下再补上「本机已安装」分组;四组预设**任何情况下都在**(包括搜索时,也包括枚举本机字体失败时),本机分组只列出预设分组没有的字体,所以同一个字体不会出现两次;搜索不到的名字可以直接「使用 xxx」新建。字体枚举被浏览器拒绝时会在一段时间后自动重试(用户在浏览器里授予字体权限后,重新打开面板即可看到本机字体)
20
20
  - **拖拽排序** —— 已选字体是 chip 列表,可拖动调整回退顺序,同时保留前移 / 后移按钮(键盘与触屏可用)
@@ -22,32 +22,14 @@
22
22
 
23
23
  ## 兼容性
24
24
 
25
- **一份包同时支持四条宿主线**——0.1.5-rc.3(下限)、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 / rc.2、0.2.0-rc.1:安装方式与宿主线无关,三条线都验证过「设置卡片可用、样式真的作用到页面、卡片上的改动写得进去」。
25
+ **一份包同时支持三条宿主线**——0.1.7-alpha.1 / alpha.2(下限)、0.1.7-rc.1 / rc.2、0.2.0-rc.1:安装方式与宿主线无关,三条线都验证过「设置卡片可用、样式真的作用到页面、卡片上的改动写得进去」。
26
26
 
27
27
  | 插件版本 | 支持的 DSH 版本 |
28
28
  | --- | --- |
29
- | **0.3.2**(最新) | 0.1.5-rc.3、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 / rc.2、0.2.0-rc.1 |
30
- | 0.3.1 | 0.1.5-rc.3、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 / rc.2 |
31
- | 0.3.0 | 0.1.5-rc.3、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 / rc.2 |
32
- | 0.2.7 | 0.1.5-rc.3、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 / rc.2 |
33
- | 0.2.6 | 0.1.5-rc.3、0.1.7-alpha.1 / alpha.2、0.1.7-rc.1 |
34
- | 0.2.5 | 0.1.5-rc.1 / rc.2 / rc.3、0.1.7-alpha.1 / alpha.2 |
35
- | 0.2.4 | 0.1.5-rc.1 / rc.2 / rc.3、0.1.7-alpha.1 / alpha.2 |
36
- | 0.2.3 | 0.1.5-rc.2 |
37
- | 0.2.2 | 0.1.5-rc.2 |
38
- | 0.2.1 | 0.1.5-rc.2 |
39
- | 0.2.0 | 0.1.5-rc.2 |
40
-
41
- `engines.dsh` 声明为 **`>=0.1.5-rc.3 <0.1.7-0 || >=0.1.7-alpha.1 <0.3.0-0`**(预发布版本必须显式留分支:node-semver 只在一个范围的某个比较符与该版本落在同一个 `major.minor.patch` 元组、且自身带预发布标签时才放行,写成 `>=0.1.5-rc.3` 匹配不到 `0.1.7-alpha.1`)。三条线的差别**全部在运行时二选一,不看版本号**:
42
-
43
- - **设置服务**:0.1.5-rc.x 是 `settingsScope.bind({namespace})`(按命名空间);0.1.7-alpha.x 与 0.1.7-rc.x 换成了 `configForms.get(<profile 条目 id>)`(按条目 id,id 由安装方的 profile 决定,所以插件靠「宿主服务的那份 schema 里有没有本插件自己的字段」来认领)。两者都是 `getSnapshot/subscribe/set/unset` 同一张脸,插件只写一套。
44
- - **loader 行 id 就是设置键**:0.1.7-rc.1 起设置按入口 id 存档,首次启动还会按**同名**把旧的 `settings.yaml` 搬过去——本包自带的 loader 行 id 因此与设置命名空间一致(`dsh-fonttune`)。同名的行 id 也让这个包可以写进 profile 的 `dsh.profile.bundles` 安装:插件管理页会把它显示为运行中,配置页照旧可达。
45
- - **配置卡片座位**:0.1.5-rc.x 是 设置 → 插件 → 插件配置 里的一个 keyed 单元(`settings.plugin.item`);0.1.7 两条线删掉了这个槽位,改成在「插件」页的官方插件列表里贡献一个条目(`plugins.item`,内置那些设置页就是这么挂的),并另外提供「已安装成 bundle 时」的每包页面(`plugins.bundle.config`)。三个座位都注册,宿主不声明的那个是惰性的;卡片在这些页面里**默认展开**——点进那个条目本身就是展开手势,不该再让人多点一次。
46
- - **宿主半的配置来源**:alpha 把 schema 标成 `.volatile()` 之后,宿主半拿到的配置字段是 cosmokit 的 volatile 引用(`{get(),[write]}`)而不是普通值,首帧样式行会因此变空;插件先把引用解出来再用。
47
- - **`inject` 只声明三条线都有的服务**(`slots`、`locale`):声明一个宿主没有的服务会把整包 park 住——alpha 上声明 `settingsScope` 会让整个 Web 界面起不来。设置服务一律用 `ctx.get(name)` 现查。
48
- - **0.1.7 的表单是「条目 id + 描述视图」**:宿主 `describe()` 还没答话时,插件不会去猜一个条目名(猜错的话每次写入都会被宿主拒绝),而是先用一个等待态座位顶住,等宿主把视图发出来再接管并立刻重读。
49
-
50
- 市场条目同时声明这些兼容信息(`package.json` 的 `engines.dsh`、`dsh.compatibility.dshReleases` 与 `peerDependencies`),安装前可据此判断这一版需要的宿主版本。
29
+ | **0.3.x**(最新,0.3.4) | 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 |
30
+ | 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 |
31
+
32
+ 每个大版本只列该系列最新的一个补丁版本(新功能引入的缺陷都在其后的补丁里修掉了,所以同一个大版本内直接用最新补丁即可;旧补丁仍可继续用,插件不破坏既有接口)。
51
33
 
52
34
  ## 安装
53
35