feat: 实现 DOCX 可编辑字体嵌入

This commit is contained in:
SkyJourney
2026-07-31 16:18:30 +08:00
parent f3847f3e4b
commit 10bc62cee4
32 changed files with 2195 additions and 76 deletions
+11 -51
View File
@@ -1,43 +1,3 @@
@font-face {
font-family: "Mdpdf Fandol Song";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("theme-shared:official-fonts/FandolSong-Regular.woff2") format("woff2");
}
@font-face {
font-family: "Mdpdf Fandol Song";
font-style: normal;
font-weight: 700;
font-display: block;
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 {
--official-red: #d40000;
--official-ink: #111;
@@ -48,7 +8,7 @@
#write {
color: var(--official-ink);
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong", "Noto Serif CJK SC",
"FandolFang", "FangSong", "STFangsong", "Noto Serif CJK SC",
"Source Han Serif SC", "SimSun", serif;
font-size: 21.333px;
line-height: 1.75;
@@ -72,7 +32,7 @@
justify-content: space-between;
color: var(--official-ink);
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;
@@ -82,7 +42,7 @@
margin: 9mm 0 8mm;
color: var(--official-red);
font-family:
"Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC",
"FandolSong", "STZhongsong", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 2em;
font-weight: 700;
@@ -104,13 +64,13 @@
#write .doc-signatory > span {
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong",
"FandolFang", "FangSong", "STFangsong",
"Noto Serif CJK SC", serif;
}
#write .doc-signatory {
font-family:
"Mdpdf Fandol Kai", "KaiTi", "STKaiti",
"FandolKai", "KaiTi", "STKaiti",
"Noto Serif CJK SC", serif;
}
@@ -118,7 +78,7 @@
margin: 0 0 12mm;
color: var(--official-ink);
font-family:
"Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC",
"FandolSong", "STZhongsong", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 1.375em;
font-weight: 700;
@@ -136,7 +96,7 @@
margin: 1em 0 0.35em;
color: var(--official-ink);
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;
@@ -150,7 +110,7 @@
#write h5,
#write h6 {
font-family:
"Mdpdf Fandol Kai", "KaiTi", "STKaiti",
"FandolKai", "KaiTi", "STKaiti",
"Noto Serif CJK SC", serif;
font-weight: 400;
}
@@ -200,7 +160,7 @@
margin: 0.8em 0;
border-collapse: collapse;
font-family:
"Mdpdf Fandol Song", "SimSun", "Noto Serif CJK SC",
"FandolSong", "SimSun", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 0.75em;
line-height: 1.5;
@@ -215,7 +175,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;
text-align: center;
@@ -262,7 +222,7 @@
border-bottom: 0.35mm solid var(--official-rule);
break-inside: avoid;
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong",
"FandolFang", "FangSong", "STFangsong",
"Noto Serif CJK SC", serif;
font-size: 0.875em;
line-height: 1.7;