From 9dee7e86057dd1c5802e94518f0fbbafb96b707d Mon Sep 17 00:00:00 2001 From: SkyJourney Date: Mon, 3 Aug 2026 12:47:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E5=8D=81=E5=9B=9B?= =?UTF-8?q?=E5=A5=97=E4=B8=BB=E9=A2=98DOCX=E5=AD=97=E4=BD=93=E6=98=A0?= =?UTF-8?q?=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/PROGRESS.md | 12 +-- .../docx-layout-visual-matrix-cases.test.mjs | 13 +++ themes/enterprise-red-simple/theme.css | 6 +- themes/enterprise-red-simple/theme.json | 25 ++++++ themes/formal-regulation/theme.css | 14 +-- themes/formal-regulation/theme.json | 25 ++++++ themes/formal-report/theme.css | 2 +- themes/formal-report/theme.json | 6 +- themes/gov-red-letter/theme.css | 40 ++------- themes/gov-red-letter/theme.json | 25 ++++++ themes/red-briefing/theme.json | 2 +- themes/tender-blind/theme.css | 4 +- themes/tender-blind/theme.json | 25 ++++++ themes/tender-business-blue/theme.css | 2 +- themes/tender-business-blue/theme.json | 18 ++++ themes/tender-classic/theme.css | 4 +- themes/tender-classic/theme.json | 25 ++++++ themes/typora-like/theme.css | 2 +- themes/typora-like/theme.json | 18 ++++ themes/typora-pixyll/pixyll.css | 8 +- themes/typora-pixyll/theme.json | 85 +++++++++++++++++++ themes/typora-whitey/theme.json | 25 ++++++ themes/typora-whitey/whitey.css | 2 +- 23 files changed, 325 insertions(+), 63 deletions(-) diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 444efd6..796e909 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -1507,11 +1507,13 @@ ECharts 第二阶段浏览器与 PDF 验证结果: 新增 `mdtp-sans-sc@1.0.0` 静态 TrueType/WOFF2,与现有 `mdtp-serif-sc@1.0.0` 组成受 `font-packs/bundle.json` 约束的确定性 双字体包集合;Desktop 安装版和便携版改为直接内置,Docker 同步执行 - 双清单哈希验证,不再依赖可选伴随安装器。`red-briefing` 与 - `gov-red-standard` 已收敛为每主题三个中文字体面,真实 Chromium、Word、 - WPS 输出均实际采用 MdTP 宋体/黑体,DOCX 各包含三个字体部件且字体门禁 - 失败为 0。下一步将同一映射规则扩展到其余 12 套主题,再修复封面和正文 - 语义块视觉差异; + 双清单哈希验证,不再依赖可选伴随安装器。14 套主题现已全部声明 DOCX + 字体,中文字体面限制为每主题最多三个;正式、公文和经典标书使用 MdTP + 宋体/黑体,现代、商务和技术主题使用 MdTP 黑体,GitHub/Pixyll 保留 + 小型拉丁字体并补充静态中文字体。14 套 Server HTTP 生产链全部成功, + 每套纵版主题默认边距场景均经真实 Chromium、Word、WPS 验证,字体声明 + 数与嵌入部件数一致,Office 实际使用门禁失败为 0。全仓库测试、类型 + 检查、生产构建和差异检查通过;下一步修复封面和正文语义块视觉差异; - 阶段 E:完成源码服务、Docker Web API、Desktop 安装版发布后复验; - 阶段 F:完成 `v0.6.1` 版本、发行说明、发布产物、发布提交和标签。 diff --git a/scripts/docx-layout-visual-matrix-cases.test.mjs b/scripts/docx-layout-visual-matrix-cases.test.mjs index 5d2405c..6e2c521 100644 --- a/scripts/docx-layout-visual-matrix-cases.test.mjs +++ b/scripts/docx-layout-visual-matrix-cases.test.mjs @@ -67,6 +67,19 @@ test("字体门禁区分缺少声明、缺少嵌入和 Office 未实际采用", assert.deepEqual(embedded, []); }); +test("14 套内置主题都声明字体且中文字体面不超过三个", () => { + const { themes } = matrix(); + const cjkFamilies = /(?:Fandol|MdTP|Song|Hei|Kai|Fang|Sim|YaHei|CJK|Han)/iu; + for (const theme of themes) { + assert.ok(theme.docxFontFaces.length > 0, `${theme.id} 缺少 DOCX 字体声明`); + assert.ok(theme.docxFontFaces.length <= 16, `${theme.id} 字体面超过协议上限`); + const cjkFaces = theme.docxFontFaces.filter((face) => + [face.family, ...face.aliases].some((family) => cjkFamilies.test(family)) + ); + assert.ok(cjkFaces.length <= 3, `${theme.id} 中文字体面超过三个`); + } +}); + test("每套主题都覆盖两个方向和五组边距", () => { const { themes, cases } = matrix(); for (const theme of themes) { diff --git a/themes/enterprise-red-simple/theme.css b/themes/enterprise-red-simple/theme.css index 6852609..dbb81fd 100644 --- a/themes/enterprise-red-simple/theme.css +++ b/themes/enterprise-red-simple/theme.css @@ -8,7 +8,7 @@ #write { color: var(--enterprise-ink); font-family: - "Noto Serif CJK SC", "Source Han Serif SC", + "FandolSong", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", "SimSun", serif; font-size: 18px; line-height: 1.8; @@ -33,7 +33,7 @@ margin: 6mm 0; color: var(--enterprise-red); font-family: - "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", serif; + "FandolSong", "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-size: 2em; font-weight: 700; letter-spacing: 0.1em; @@ -65,7 +65,7 @@ margin: 1.4em 0 0.55em; color: var(--enterprise-red); font-family: - "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; + "FandolHei", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; font-weight: 700; line-height: 1.45; } diff --git a/themes/enterprise-red-simple/theme.json b/themes/enterprise-red-simple/theme.json index f3e30d9..f641ed5 100644 --- a/themes/enterprise-red-simple/theme.json +++ b/themes/enterprise-red-simple/theme.json @@ -32,5 +32,30 @@ "docxStyle": { "preset": "official" }, + "docxFonts": { + "faces": [ + { + "family": "FandolSong", + "aliases": ["Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "SimHei", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/formal-regulation/theme.css b/themes/formal-regulation/theme.css index 6be5a82..7296058 100644 --- a/themes/formal-regulation/theme.css +++ b/themes/formal-regulation/theme.css @@ -8,7 +8,7 @@ #write { color: var(--regulation-ink); font-family: - "FangSong", "STFangsong", "Noto Serif CJK SC", + "FandolSong", "FangSong", "STFangsong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; font-size: 18px; line-height: 1.8; @@ -18,7 +18,7 @@ #write > h1:first-child { margin: 8mm 0 12mm; font-family: - "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", serif; + "FandolSong", "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-size: 1.8em; line-height: 1.4; text-align: center; @@ -39,12 +39,12 @@ #write h1 { font-family: - "STZhongsong", "Noto Serif CJK SC", serif; + "FandolSong", "STZhongsong", "Noto Serif CJK SC", serif; } #write h2 { font-family: - "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; } #write h3, @@ -52,7 +52,7 @@ #write h5, #write h6 { font-family: - "KaiTi", "STKaiti", "Noto Serif CJK SC", serif; + "FandolSong", "KaiTi", "STKaiti", "Noto Serif CJK SC", serif; } #write p { @@ -86,7 +86,7 @@ margin: 0.8em 0; border-collapse: collapse; font-family: - "SimSun", "Noto Serif CJK SC", serif; + "FandolSong", "SimSun", "Noto Serif CJK SC", serif; font-size: 0.84em; line-height: 1.5; } @@ -100,7 +100,7 @@ #write th { background: #e9e9e9; font-family: - "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 700; text-align: center; } diff --git a/themes/formal-regulation/theme.json b/themes/formal-regulation/theme.json index c2b35a1..5b28dff 100644 --- a/themes/formal-regulation/theme.json +++ b/themes/formal-regulation/theme.json @@ -24,5 +24,30 @@ "docxStyle": { "preset": "formal" }, + "docxFonts": { + "faces": [ + { + "family": "FandolSong", + "aliases": ["STZhongsong", "FangSong", "STFangsong", "KaiTi", "STKaiti", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["STZhongsong", "FangSong", "STFangsong", "KaiTi", "STKaiti", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "SimHei", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/formal-report/theme.css b/themes/formal-report/theme.css index af2acda..ef7fe5c 100644 --- a/themes/formal-report/theme.css +++ b/themes/formal-report/theme.css @@ -10,7 +10,7 @@ #write { color: var(--report-ink); font-family: - "FandolFang", "Noto Serif CJK SC", "Source Han Serif SC", + "FandolSong", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", "SimSun", serif; font-size: 18px; line-height: 1.8; diff --git a/themes/formal-report/theme.json b/themes/formal-report/theme.json index 61c11b5..6291b07 100644 --- a/themes/formal-report/theme.json +++ b/themes/formal-report/theme.json @@ -24,9 +24,9 @@ "docxFonts": { "faces": [ { - "family": "FandolFang", - "aliases": ["FangSong", "STFangsong", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", "SimSun"], - "source": "theme-shared:official-fonts/FandolFang-Regular.woff2", + "family": "FandolSong", + "aliases": ["FangSong", "STFangsong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", "license": "GPL-3.0-or-later WITH Font-exception-2.0" }, { diff --git a/themes/gov-red-letter/theme.css b/themes/gov-red-letter/theme.css index 5a365f2..75b8ae5 100644 --- a/themes/gov-red-letter/theme.css +++ b/themes/gov-red-letter/theme.css @@ -14,30 +14,6 @@ src: url("theme-shared:official-fonts/FandolSong-Bold.woff2") format("woff2"); } -@font-face { - font-family: "Mdpdf Fandol Fang"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("theme-shared:official-fonts/FandolFang-Regular.woff2") format("woff2"); -} - -@font-face { - font-family: "Mdpdf Fandol Hei"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("theme-shared:official-fonts/FandolHei-Regular.woff2") format("woff2"); -} - -@font-face { - font-family: "Mdpdf Fandol Kai"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("theme-shared:official-fonts/FandolKai-Regular.woff2") format("woff2"); -} - :root { --letter-red: #d40000; --letter-ink: #111; @@ -46,7 +22,7 @@ #write { color: var(--letter-ink); font-family: - "Mdpdf Fandol Fang", "FangSong", "STFangsong", "Noto Serif CJK SC", + "Mdpdf Fandol Song", "FangSong", "STFangsong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; font-size: 21.333px; line-height: 1.75; @@ -83,7 +59,7 @@ min-height: 1.75em; justify-content: space-between; font-family: - "Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC", + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-size: 0.75em; font-weight: 400; @@ -130,7 +106,7 @@ #write h6 { margin: 1em 0 0.35em; font-family: - "Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC", + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-size: 1em; font-weight: 400; @@ -144,20 +120,20 @@ #write h5, #write h6 { font-family: - "Mdpdf Fandol Kai", "KaiTi", "STKaiti", + "Mdpdf Fandol Song", "KaiTi", "STKaiti", "Noto Serif CJK SC", serif; font-weight: 400; } #write .doc-signatory { font-family: - "Mdpdf Fandol Kai", "KaiTi", "STKaiti", + "Mdpdf Fandol Song", "KaiTi", "STKaiti", "Noto Serif CJK SC", serif; } #write .doc-signatory > span { font-family: - "Mdpdf Fandol Fang", "FangSong", "STFangsong", + "Mdpdf Fandol Song", "FangSong", "STFangsong", "Noto Serif CJK SC", serif; } @@ -220,7 +196,7 @@ #write th { background: #f5f5f5; font-family: - "Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC", + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 400; } @@ -264,7 +240,7 @@ margin-top: 8mm; break-inside: avoid; font-family: - "Mdpdf Fandol Fang", "FangSong", "STFangsong", + "Mdpdf Fandol Song", "FangSong", "STFangsong", "Noto Serif CJK SC", serif; font-size: 0.875em; line-height: 1.7; diff --git a/themes/gov-red-letter/theme.json b/themes/gov-red-letter/theme.json index d15d869..f0d2b48 100644 --- a/themes/gov-red-letter/theme.json +++ b/themes/gov-red-letter/theme.json @@ -64,5 +64,30 @@ "docxStyle": { "preset": "official" }, + "docxFonts": { + "faces": [ + { + "family": "Mdpdf Fandol Song", + "aliases": ["FandolSong", "STZhongsong", "FangSong", "STFangsong", "KaiTi", "STKaiti", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "Mdpdf Fandol Song", + "aliases": ["FandolSong", "STZhongsong", "FangSong", "STFangsong", "KaiTi", "STKaiti", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Mdpdf Fandol Hei", "Noto Sans CJK SC", "Source Han Sans SC", "SimHei", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/red-briefing/theme.json b/themes/red-briefing/theme.json index add8276..d307163 100644 --- a/themes/red-briefing/theme.json +++ b/themes/red-briefing/theme.json @@ -53,7 +53,7 @@ "aliases": ["FandolHei", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", "weight": 700, - "license": "OFL-1.1" + "license": "GPL-3.0-or-later WITH Font-exception-2.0" } ] }, diff --git a/themes/tender-blind/theme.css b/themes/tender-blind/theme.css index 4c0f84e..3556e94 100644 --- a/themes/tender-blind/theme.css +++ b/themes/tender-blind/theme.css @@ -7,7 +7,7 @@ #write { color: var(--blind-ink); font-family: - "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif; + "FandolSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-size: 16px; line-height: 1.7; overflow-wrap: break-word; @@ -74,7 +74,7 @@ #write h6 { color: #000; font-family: - "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; + "FandolHei", "SimHei", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 700; } diff --git a/themes/tender-blind/theme.json b/themes/tender-blind/theme.json index 90c7db6..4f77f8d 100644 --- a/themes/tender-blind/theme.json +++ b/themes/tender-blind/theme.json @@ -24,5 +24,30 @@ "docxStyle": { "preset": "tender" }, + "docxFonts": { + "faces": [ + { + "family": "FandolSong", + "aliases": ["Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "SimHei", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/tender-business-blue/theme.css b/themes/tender-business-blue/theme.css index 2dae7ec..9b8d117 100644 --- a/themes/tender-business-blue/theme.css +++ b/themes/tender-business-blue/theme.css @@ -11,7 +11,7 @@ #write { color: var(--business-ink); font-family: - "Noto Sans CJK SC", "Source Han Sans SC", + "FandolHei", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; font-size: 17px; line-height: 1.75; diff --git a/themes/tender-business-blue/theme.json b/themes/tender-business-blue/theme.json index 1ba298b..a45784e 100644 --- a/themes/tender-business-blue/theme.json +++ b/themes/tender-business-blue/theme.json @@ -30,5 +30,23 @@ "color": "#2563eb" } }, + "docxFonts": { + "faces": [ + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/tender-classic/theme.css b/themes/tender-classic/theme.css index e0fd328..945bbfb 100644 --- a/themes/tender-classic/theme.css +++ b/themes/tender-classic/theme.css @@ -8,7 +8,7 @@ #write { color: var(--tender-ink); font-family: - "Noto Serif CJK SC", "Source Han Serif SC", + "FandolSong", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", "SimSun", serif; font-size: 17px; line-height: 1.75; @@ -78,7 +78,7 @@ #write h3, #write h4 { font-family: - "Noto Sans CJK SC", "Source Han Sans SC", + "FandolHei", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; font-weight: 700; } diff --git a/themes/tender-classic/theme.json b/themes/tender-classic/theme.json index 91239d3..35ee5a3 100644 --- a/themes/tender-classic/theme.json +++ b/themes/tender-classic/theme.json @@ -27,5 +27,30 @@ "color": "#000000" } }, + "docxFonts": { + "faces": [ + { + "family": "FandolSong", + "aliases": ["Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/typora-like/theme.css b/themes/typora-like/theme.css index 6ebfece..7b8f822 100644 --- a/themes/typora-like/theme.css +++ b/themes/typora-like/theme.css @@ -11,7 +11,7 @@ margin: 0 auto; color: var(--md-text); font-family: - "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; + "FandolHei", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.75; overflow-wrap: break-word; diff --git a/themes/typora-like/theme.json b/themes/typora-like/theme.json index fc3f7c4..a0a1961 100644 --- a/themes/typora-like/theme.json +++ b/themes/typora-like/theme.json @@ -21,5 +21,23 @@ "docxStyle": { "preset": "technical" }, + "docxFonts": { + "faces": [ + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/typora-pixyll/pixyll.css b/themes/typora-pixyll/pixyll.css index 7a9bab0..1f131f8 100644 --- a/themes/typora-pixyll/pixyll.css +++ b/themes/typora-pixyll/pixyll.css @@ -114,7 +114,7 @@ h4 { */ body { - font-family: "Merriweather", "PT Serif", Georgia, "Times New Roman", "STSong", 'Segoe UI Emoji','SF Pro', Serif; + font-family: "Merriweather", "FandolSong", "PT Serif", Georgia, "Times New Roman", "STSong", 'Segoe UI Emoji','SF Pro', Serif; line-height: 1.5rem; font-weight: 400; } @@ -236,7 +236,7 @@ h5, .h5, h6, .h6 { - font-family: "Lato", 'Helvetica Neue', Helvetica, sans-serif; + font-family: "Lato", "FandolHei", 'Helvetica Neue', Helvetica, sans-serif; font-weight: bold; line-height: 1.2; margin: 1em 0 0.5em; @@ -345,7 +345,7 @@ a { line-height: 1.5em; color: #7a7a7a; background-color: #fafafa; - font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif; + font-family: 'Lato', "FandolHei", 'Helvetica Neue', Helvetica, sans-serif; font-weight: 300; clear: both; padding-left: 0; @@ -358,7 +358,7 @@ a { font-size:1.1rem; } .md-tag { - font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif; + font-family: 'Lato', "FandolHei", 'Helvetica Neue', Helvetica, sans-serif; } .code-tooltip { background: white; diff --git a/themes/typora-pixyll/theme.json b/themes/typora-pixyll/theme.json index 8110b91..fa19da6 100644 --- a/themes/typora-pixyll/theme.json +++ b/themes/typora-pixyll/theme.json @@ -21,5 +21,90 @@ "docxStyle": { "preset": "general" }, + "docxFonts": { + "faces": [ + { + "family": "Merriweather", + "aliases": ["PT Serif", "Georgia", "Times New Roman"], + "source": "pixyll/merriweather-v19-latin-300.woff", + "weight": 300, + "license": "OFL-1.1" + }, + { + "family": "Merriweather", + "aliases": ["PT Serif", "Georgia", "Times New Roman"], + "source": "pixyll/merriweather-v19-latin-300italic.woff", + "weight": 300, + "style": "italic", + "license": "OFL-1.1" + }, + { + "family": "Merriweather", + "aliases": ["PT Serif", "Georgia", "Times New Roman"], + "source": "pixyll/merriweather-v19-latin-700.woff", + "weight": 700, + "license": "OFL-1.1" + }, + { + "family": "Merriweather", + "aliases": ["PT Serif", "Georgia", "Times New Roman"], + "source": "pixyll/merriweather-v19-latin-700italic.woff", + "weight": 700, + "style": "italic", + "license": "OFL-1.1" + }, + { + "family": "Lato", + "aliases": ["Helvetica Neue", "Helvetica", "Arial"], + "source": "pixyll/lato-v14-latin-300.woff", + "weight": 300, + "license": "OFL-1.1" + }, + { + "family": "Lato", + "aliases": ["Helvetica Neue", "Helvetica", "Arial"], + "source": "pixyll/lato-v14-latin-300italic.woff", + "weight": 300, + "style": "italic", + "license": "OFL-1.1" + }, + { + "family": "Lato", + "aliases": ["Helvetica Neue", "Helvetica", "Arial"], + "source": "pixyll/lato-v14-latin-900.woff", + "weight": 900, + "license": "OFL-1.1" + }, + { + "family": "Lato", + "aliases": ["Helvetica Neue", "Helvetica", "Arial"], + "source": "pixyll/lato-v14-latin-900italic.woff", + "weight": 900, + "style": "italic", + "license": "OFL-1.1" + }, + { + "family": "FandolSong", + "aliases": ["STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/typora-whitey/theme.json b/themes/typora-whitey/theme.json index 140f174..e62cbcb 100644 --- a/themes/typora-whitey/theme.json +++ b/themes/typora-whitey/theme.json @@ -21,5 +21,30 @@ "docxStyle": { "preset": "general" }, + "docxFonts": { + "faces": [ + { + "family": "FandolSong", + "aliases": ["Vollkorn", "Palatino", "Times", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolSong", + "aliases": ["Vollkorn", "Palatino", "Times", "SimSun"], + "source": "theme-shared:official-fonts/FandolSong-Bold.woff2", + "weight": 700, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + }, + { + "family": "FandolHei", + "aliases": ["Arial", "Microsoft YaHei"], + "source": "theme-shared:official-fonts/FandolHei-Regular.woff2", + "weight": 400, + "license": "GPL-3.0-or-later WITH Font-exception-2.0" + } + ] + }, "bundled": true } diff --git a/themes/typora-whitey/whitey.css b/themes/typora-whitey/whitey.css index 5134337..8e5e25d 100644 --- a/themes/typora-whitey/whitey.css +++ b/themes/typora-whitey/whitey.css @@ -8,7 +8,7 @@ html, body { -webkit-font-smoothing: antialiased; } body { - font-family: "Vollkorn", Palatino, Times; + font-family: "FandolSong", "Vollkorn", Palatino, Times; color: #333; line-height: 1.4; text-align: justify;