fix: resolve font assets under development base paths

Serve font definitions beside their WOFF2 files through a base-aware stylesheet link, using relative URLs consistently in dev and static builds.

Exercise all six faces, nested-route reloads and existing font fallback/no-JS checks in the dev suite; avoid starting the preview server as part of dev checks.
This commit is contained in:
2026-10-16 06:12:57 +09:00
parent c480b67301
commit 1297d86140
6 changed files with 47 additions and 15 deletions
+45
View File
@@ -0,0 +1,45 @@
/* Self-hosted, unmodified upstream fonts; revisions and licenses: README.md.
Linked through the site's base-aware href helper. Relative URLs resolve beside
this stylesheet in both dev and static builds, without Vite URL rewriting. */
@font-face {
font-family: 'Lyth Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('LythMono-Regular.woff2') format('woff2');
}
@font-face {
font-family: 'Lyth Mono';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('LythMono-Bold.woff2') format('woff2');
}
@font-face {
font-family: 'EB Garamond';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('EBGaramond-Regular.woff2') format('woff2');
}
@font-face {
font-family: 'EB Garamond';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('EBGaramond-Bold.woff2') format('woff2');
}
@font-face {
font-family: 'EB Garamond';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('EBGaramond-Italic.woff2') format('woff2');
}
@font-face {
font-family: 'EB Garamond';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('EBGaramond-BoldItalic.woff2') format('woff2');
}