@xingwangzhe/stalux 1.28.0 → 1.28.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingwangzhe/stalux",
3
- "version": "1.28.0",
3
+ "version": "1.28.1",
4
4
  "description": "A powerful, modern Astro blog theme — use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -201,7 +201,9 @@ export function writePageFontSubset(
201
201
  const codeStack = originalCodeStack
202
202
  ? `${originalCodeStack},"LXGW WenKai-Page Subset"`
203
203
  : `"LXGW WenKai-Page Subset",${fallbackStack}`;
204
- const css = `@font-face{font-family:"LXGW WenKai-Page Subset";src:url("${rel}") format("woff2");font-style:normal;font-weight:400;font-display:swap;unicode-range:${[...chars].map((c) => `U+${c.codePointAt(0)?.toString(16).toUpperCase()}`).join(",")}}:root{--font-body:"LXGW WenKai-Page Subset",${fallbackStack};--font-code:${codeStack}}`;
204
+ // The source font is regular; advertise a weight range so browsers synthesize
205
+ // bold weights from these same glyphs instead of falling back to system CJK.
206
+ const css = `@font-face{font-family:"LXGW WenKai-Page Subset";src:url("${rel}") format("woff2");font-style:normal;font-weight:100 900;font-display:swap;unicode-range:${[...chars].map((c) => `U+${c.codePointAt(0)?.toString(16).toUpperCase()}`).join(",")}}:root{--font-body:"LXGW WenKai-Page Subset",${fallbackStack};--font-code:${codeStack}}body{font-family:var(--font-body),${fallbackStack}}`;
205
207
  const withoutBroadBodyFonts = html.replace(
206
208
  /@font-face\{[^}]*font-family:"LXGW WenKai-[^"]+"[^}]*\}/g,
207
209
  (face) => {