Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

feat(web,ui): 字体致谢的「来源」指向字体项目本身,npm 包名另起一行

lmlihengbe5baad696cd
diff --git a/changelog/unreleased/2026-10-27-font-credit-upstream.md b/changelog/unreleased/2026-10-27-font-credit-upstream.md
new file mode 100644
index 00000000..202a46b0
--- /dev/null
+++ b/changelog/unreleased/2026-10-27-font-credit-upstream.md
@@ -0,0 +1,27 @@
+# Typography credits link to the type's own project, with the npm package on its own line
+
+- **Date:** 2026-10-27
+- **Type:** feat
+- **Scope:** `web`, `ui`
+- **Breaking:** no
+
+[中文](2026-10-27-font-credit-upstream.zh.md)
+
+**Credits** in settings lists every face by the themes that use it, its licence, and the full text. Its
+**Source** row used to print a package name such as `@fontsource-variable/mona-sans`, which is neither a
+URL nor the party the licence credits. Source is now a link to the type's own project (Mona Sans points
+at GitHub's `github/mona-sans`, and JetBrains Mono, IBM Plex and Noto Sans SC likewise), and how the file
+reaches us is a second row, **Packaged as**, underneath. MiSans already came from the vendor's own
+download page, where both would be the same address, so that row is left out for it.
+
+## Details
+
+- `packages/ui/src/fonts/credits.ts`: `FontCredit` gains a required `upstream` (whose type it is);
+ `source` stays "how the file got here" (an npm package or the vendor's download page).
+- `packages/web/src/features/settings/credits-section.tsx`: **Source** links `upstream`; a **Packaged as**
+ row is drawn only when `source` differs from it, in monospace and not as a link.
+- Strings: `creditsPackaged` ("打包来源" / "Packaged as").
+
+## Compatibility
+
+- Presentation only: license texts and `THIRD-PARTY-NOTICES.md` are unchanged.
diff --git a/changelog/unreleased/2026-10-27-font-credit-upstream.zh.md b/changelog/unreleased/2026-10-27-font-credit-upstream.zh.md
new file mode 100644
index 00000000..af2c1651
--- /dev/null
+++ b/changelog/unreleased/2026-10-27-font-credit-upstream.zh.md
@@ -0,0 +1,26 @@
+# 字体致谢里「来源」指向字体项目本身,npm 包名另起一行
+
+- **Date:** 2026-10-27
+- **Type:** feat
+- **Scope:** `web`, `ui`
+- **Breaking:** no
+
+[English](2026-10-27-font-credit-upstream.md)
+
+设置里的**版权信息**页逐个字体列出它用在哪个主题、什么许可、全文在哪。其中「来源」那一行以前写的是
+`@fontsource-variable/mona-sans` 这样的包名 —— 它既不是网址,也不是这项许可的持有人。现在那一行是指向
+字体项目本身的链接(Mona Sans 指 GitHub 的 `github/mona-sans`,JetBrains Mono、IBM Plex、Noto Sans SC
+同理),文件究竟从哪个 npm 包来,另起一行「打包来源」写在下面。MiSans 本来就是从厂商的下载页来的,
+两行是同一个地址,所以那一条不出现第二行。
+
+## 细节
+
+- `packages/ui/src/fonts/credits.ts`:`FontCredit` 多一个必填的 `upstream`(这是谁的字体),`source`
+ 仍是文件怎么来的(npm 包或厂商下载页)。
+- `packages/web/src/features/settings/credits-section.tsx`:「来源」链 `upstream`,`source` 与它不同时
+ 才多画一行「打包来源」,值用等宽字、不可点击。
+- 文案:`creditsPackaged`(中「打包来源」/ 英 "Packaged as")。
+
+## 兼容
+
+- 只改了展示:许可正文与 `THIRD-PARTY-NOTICES.md` 都没有变。
diff --git a/packages/ui/src/fonts/credits.ts b/packages/ui/src/fonts/credits.ts
index 10a164ce..a0621fb6 100644
--- a/packages/ui/src/fonts/credits.ts
+++ b/packages/ui/src/fonts/credits.ts
@@ -30,6 +30,11 @@ export interface FontCredit {
readonly themes: readonly ThemeId[];
/** The npm package the face arrives through, or the vendor's download for a vendored face. */
readonly source: string;
+ /**
+ * The type's own project — the licence holder's page, which is what a reader following "来源"
+ * wants. `source` says how the file got here; this says whose type it is.
+ */
+ readonly upstream: string;
readonly licenseTitle: string;
readonly licenseText: string;
}
@@ -49,6 +54,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "Mona Sans",
themes: namedBy("Mona Sans"),
source: "@fontsource-variable/mona-sans",
+ upstream: "https://github.com/github/mona-sans",
licenseTitle: OFL,
licenseText: monaSans,
},
@@ -57,6 +63,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "JetBrains Mono",
themes: namedBy("JetBrains Mono"),
source: "@fontsource-variable/jetbrains-mono",
+ upstream: "https://github.com/JetBrains/JetBrainsMono",
licenseTitle: OFL,
licenseText: jetbrainsMono,
},
@@ -65,6 +72,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "MiSans",
themes: namedBy("MiSans"),
source: MISANS_SOURCE,
+ upstream: MISANS_SOURCE,
licenseTitle: MISANS_LICENSE_TITLE,
licenseText: misans,
},
@@ -73,6 +81,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "IBM Plex Sans",
themes: namedBy("IBM Plex Sans"),
source: "@fontsource-variable/ibm-plex-sans",
+ upstream: "https://github.com/IBM/plex",
licenseTitle: OFL,
licenseText: ibmPlexSans,
},
@@ -83,6 +92,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "IBM Plex Sans Condensed",
themes: [],
source: "@fontsource/ibm-plex-sans-condensed",
+ upstream: "https://github.com/IBM/plex",
licenseTitle: OFL,
licenseText: ibmPlexSansCondensed,
},
@@ -91,6 +101,7 @@ export const FONT_CREDITS: readonly FontCredit[] = [
family: "Noto Sans SC",
themes: namedBy("Noto Sans SC"),
source: "@fontsource-variable/noto-sans-sc",
+ upstream: "https://github.com/notofonts/noto-cjk",
licenseTitle: OFL,
licenseText: notoSansSc,
},
diff --git a/packages/web/src/features/settings/credits-section.tsx b/packages/web/src/features/settings/credits-section.tsx
index 2e244ed8..fe6dc168 100644
--- a/packages/web/src/features/settings/credits-section.tsx
+++ b/packages/web/src/features/settings/credits-section.tsx
@@ -67,17 +67,26 @@ function CreditRow({ font }: { font: FontCredit }) {
</dd>
<dt className="text-gray-500 dark:text-gray-400">{S.settings.creditsLicense}</dt>
<dd>{font.licenseTitle}</dd>
+ {/* The link goes to the type's own project, not to the npm package it reaches us
+ through: "@fontsource-variable/mona-sans" is not a URL, and it is not who the licence
+ credits either. How the file got here is the line under it. */}
<dt className="text-gray-500 dark:text-gray-400">{S.settings.creditsSource}</dt>
<dd className="min-w-0 break-all">
<a
- href={font.source}
+ href={font.upstream}
target="_blank"
rel="noreferrer"
className="text-link underline-offset-2 hover:underline"
>
- {font.source}
+ {font.upstream}
</a>
</dd>
+ {font.source !== font.upstream && (
+ <>
+ <dt className="text-gray-500 dark:text-gray-400">{S.settings.creditsPackaged}</dt>
+ <dd className="min-w-0 font-mono break-all">{font.source}</dd>
+ </>
+ )}
</dl>
<LicenseText text={font.licenseText} />
</li>
diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.ts
index 121a882c..d246a975 100644
--- a/packages/web/src/lib/strings-en.ts
+++ b/packages/web/src/lib/strings-en.ts
@@ -375,6 +375,7 @@ export const en: Strings = {
creditsNoTheme: "Not a theme's default",
creditsLicense: "License",
creditsSource: "Source",
+ creditsPackaged: "Packaged as",
creditsLicenseText: "Full license text",
agentApiTitle: "Agent API",
agentApiToggle: "Allow the Agent API",
diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.ts
index 2cbcad9b..954a9ea5 100644
--- a/packages/web/src/lib/strings.ts
+++ b/packages/web/src/lib/strings.ts
@@ -444,6 +444,8 @@ export const zh = {
creditsNoTheme: "没有主题默认使用",
creditsLicense: "许可",
creditsSource: "来源",
+ /** The npm package a face arrives through, under the type's own project link. */
+ creditsPackaged: "打包来源",
creditsLicenseText: "许可全文",
/** Settings › Server › Agent API: the admin's switch over every Agent's public API, and the question before it goes off. */
agentApiTitle: "Agent API",