diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-01 10:06:15 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-01 10:06:15 +0300 |
| commit | f4090989293ee11735d8ca20edd4e3308d87e24f (patch) | |
| tree | ab308f2a38ad3429ec4a23da487a451cc289545b | |
| parent | 6e0352ccf175a4a866ec03a42f3f899150ee093b (diff) | |
biomech theme: self-host Oxanium 400/700 webfont (task sa)
- Add Oxanium-Regular.woff2 and Oxanium-Bold.woff2 (latin + latin-ext
subset, ~22 KB total) by Tyler Finck, fetched 2026-05-01 from
https://gwfh.mranftl.com/fonts/oxanium (mirrors Google Fonts);
released under SIL OFL 1.1.
- biomech/theme.css: add @font-face blocks pointing at the local
files. The CSS already declared 'Oxanium' as the body font but
the family was never loaded, so it silently fell back to system
sans-serif. Now the geometric techy face actually renders.
- biomech/FONT_LICENSE.txt: full attribution + OFL link + source
URL + fetch date so future maintainers can re-fetch deterministically.
- templates/embed.go: append themes/*/*.woff2 to the //go:embed glob
(deferred from task ra because go:embed requires every pattern to
match at least one file, which biomech now satisfies).
- README.md: append biomech entry to the bundled-fonts bullet list.
Self-hosted, no third-party CDN requests at page load; verified via
grep -RnE 'googleapis|gstatic|@import url\(http' against both source
and generated dist.
Amp-Thread-ID: https://ampcode.com/threads/T-019de000-c062-73c5-9afc-c9af422473cf
Co-authored-by: Amp <amp@ampcode.com>
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | internal/generator/templates/embed.go | 8 | ||||
| -rw-r--r-- | internal/generator/templates/themes/biomech/FONT_LICENSE.txt | 35 | ||||
| -rw-r--r-- | internal/generator/templates/themes/biomech/Oxanium-Bold.woff2 | bin | 0 -> 10884 bytes | |||
| -rw-r--r-- | internal/generator/templates/themes/biomech/Oxanium-Regular.woff2 | bin | 0 -> 10864 bytes | |||
| -rw-r--r-- | internal/generator/templates/themes/biomech/theme.css | 17 |
6 files changed, 59 insertions, 5 deletions
@@ -128,6 +128,10 @@ Bundled web fonts: [Ultimate Oldschool PC Font Pack v2.2](https://int10h.org/oldschool-pc-fonts/), [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). See [internal/generator/templates/themes/dos/FONT_LICENSE.txt](internal/generator/templates/themes/dos/FONT_LICENSE.txt). +- **biomech** — *Oxanium* Regular + Bold (.woff2, latin+latin-ext) by + Tyler Finck, from [Google Fonts](https://fonts.google.com/specimen/Oxanium), + [SIL OFL 1.1](https://openfontlicense.org/open-font-license-official-text/). + See [internal/generator/templates/themes/biomech/FONT_LICENSE.txt](internal/generator/templates/themes/biomech/FONT_LICENSE.txt). When adding a new bundled font: diff --git a/internal/generator/templates/embed.go b/internal/generator/templates/embed.go index a402a71..56fc673 100644 --- a/internal/generator/templates/embed.go +++ b/internal/generator/templates/embed.go @@ -31,12 +31,10 @@ import ( // and writeThemeAsset. // // NOTE on the embed glob below: //go:embed requires every pattern to -// match at least one file, so each font extension is only added once -// the first theme actually ships such a file. When you introduce the -// first .woff2 file (or any new extension), append the matching glob -// here, e.g.: themes/*/*.woff2 +// match at least one file. When you introduce a new font extension +// that no other theme uses yet, append the matching glob here. // -//go:embed shell.tmpl shared/*.tmpl shared/shared.css shared/shared.js themes/*/theme.css themes/*/theme.js themes/*/meta.json themes/*/sounds.json themes/*/*.woff themes/*/FONT_LICENSE.txt +//go:embed shell.tmpl shared/*.tmpl shared/shared.css shared/shared.js themes/*/theme.css themes/*/theme.js themes/*/meta.json themes/*/sounds.json themes/*/*.woff themes/*/*.woff2 themes/*/FONT_LICENSE.txt var FS embed.FS // themeStandardFiles lists the per-theme files that have dedicated diff --git a/internal/generator/templates/themes/biomech/FONT_LICENSE.txt b/internal/generator/templates/themes/biomech/FONT_LICENSE.txt new file mode 100644 index 0000000..4aab555 --- /dev/null +++ b/internal/generator/templates/themes/biomech/FONT_LICENSE.txt @@ -0,0 +1,35 @@ +Oxanium +======= + +This directory bundles the web font: + + Oxanium-Regular.woff2 (weight 400) + Oxanium-Bold.woff2 (weight 700) + +Subsets: latin, latin-ext. + +Source / version +---------------- +- Family page : https://fonts.google.com/specimen/Oxanium +- Designer : Tyler Finck +- Webfont set : oxanium-v21 (latin + latin-ext, woff2) +- Fetched via : https://gwfh.mranftl.com/fonts/oxanium (Webfonts Helper) +- Fetched on : 2026-05-01 + +License +------- +SIL Open Font License, Version 1.1. + + - Summary : https://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web + - Full text : https://openfontlicense.org/open-font-license-official-text/ + - Project : https://github.com/sevmeyer/oxanium + +The OFL allows free use, modification, and redistribution of the font, +including embedding in commercial products. Any standalone modified +version of the font itself must be released under the same license and +must not use the Reserved Font Name "Oxanium". + +Required attribution +-------------------- +Font: "Oxanium" by Tyler Finck — https://github.com/sevmeyer/oxanium + Licensed under the SIL Open Font License 1.1. diff --git a/internal/generator/templates/themes/biomech/Oxanium-Bold.woff2 b/internal/generator/templates/themes/biomech/Oxanium-Bold.woff2 Binary files differnew file mode 100644 index 0000000..9f50ada --- /dev/null +++ b/internal/generator/templates/themes/biomech/Oxanium-Bold.woff2 diff --git a/internal/generator/templates/themes/biomech/Oxanium-Regular.woff2 b/internal/generator/templates/themes/biomech/Oxanium-Regular.woff2 Binary files differnew file mode 100644 index 0000000..eb1f382 --- /dev/null +++ b/internal/generator/templates/themes/biomech/Oxanium-Regular.woff2 diff --git a/internal/generator/templates/themes/biomech/theme.css b/internal/generator/templates/themes/biomech/theme.css index 6487149..50d9fcf 100644 --- a/internal/generator/templates/themes/biomech/theme.css +++ b/internal/generator/templates/themes/biomech/theme.css @@ -1,3 +1,20 @@ + /* Self-hosted web font: Oxanium by Tyler Finck (SIL OFL 1.1). + Source: https://fonts.google.com/specimen/Oxanium + See FONT_LICENSE.txt in this directory. */ + @font-face { + font-family: 'Oxanium'; + src: url('Oxanium-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; + } + @font-face { + font-family: 'Oxanium'; + src: url('Oxanium-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; + } :root { --bone:#d0c7bb; --flesh:#803f5d; --vein:#f55b7d; --acid:#93ffd8; --steel:#2d3642; --bg:#09070d; } * { margin:0; padding:0; box-sizing:border-box; } body { font-family:'Oxanium',system-ui,sans-serif; background:var(--bg); color:var(--bone); overflow:hidden; height:100vh; height:100dvh; } |
