summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-01 16:19:55 +0300
committerPaul Buetow <paul@buetow.org>2026-05-01 16:19:55 +0300
commit227bf11efc3b1a65c75d0bb99099e37420128b12 (patch)
tree47aed97f2c41873c8565266c82981dc4f2124f11
parent8fce1ed70c57b180059da423a544ddbf1b47342a (diff)
va self-host retrofuture webfonts
-rw-r--r--README.md6
-rw-r--r--integrationtests/integration_test.go27
-rw-r--r--internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt54
-rw-r--r--internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-700.woff2bin0 -> 6368 bytes
-rw-r--r--internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-regular.woff2bin0 -> 6252 bytes
-rw-r--r--internal/generator/templates/themes/retrofuture/share-tech-mono-v16-latin_latin-ext-regular.woff2bin0 -> 13760 bytes
-rw-r--r--internal/generator/templates/themes/retrofuture/theme.css25
7 files changed, 109 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3706b38..eb2f038 100644
--- a/README.md
+++ b/README.md
@@ -161,6 +161,12 @@ Bundled web fonts:
Indian Type Foundry, from [Google Fonts](https://fonts.google.com/specimen/Rajdhani),
[SIL OFL 1.1](https://openfontlicense.org/open-font-license-official-text/).
See [internal/generator/templates/themes/plasma/FONT_LICENSE.txt](internal/generator/templates/themes/plasma/FONT_LICENSE.txt).
+- **retrofuture** — *Orbitron* Regular + Bold and *Share Tech Mono* Regular
+ (.woff2, latin+latin-ext) by The Orbitron Project Authors and Carrois
+ Apostrophe, from Google Fonts ([Orbitron](https://fonts.google.com/specimen/Orbitron),
+ [Share Tech Mono](https://fonts.google.com/specimen/Share+Tech+Mono)),
+ [SIL OFL 1.1](https://openfontlicense.org/open-font-license-official-text/).
+ See [internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt](internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt).
- **retro** — *VT323* Regular (.woff2, latin+latin-ext) by Peter Hull,
from [Google Fonts](https://fonts.google.com/specimen/VT323),
[SIL OFL 1.1](https://openfontlicense.org/open-font-license-official-text/).
diff --git a/integrationtests/integration_test.go b/integrationtests/integration_test.go
index 526816d..ae67dfc 100644
--- a/integrationtests/integration_test.go
+++ b/integrationtests/integration_test.go
@@ -457,9 +457,28 @@ func TestThemeSelection(t *testing.T) {
t.Fatalf("theme asset %s is empty", path)
}
}
- if theme == "matrix" || theme == "retro" {
+ fontAssets := map[string][]string{
+ "matrix": {"VT323-Regular.woff2", "FONT_LICENSE.txt"},
+ "retro": {"VT323-Regular.woff2", "FONT_LICENSE.txt"},
+ "retrofuture": {
+ "FONT_LICENSE.txt",
+ "orbitron-v35-latin_latin-ext-700.woff2",
+ "orbitron-v35-latin_latin-ext-regular.woff2",
+ "share-tech-mono-v16-latin_latin-ext-regular.woff2",
+ },
+ }
+ fontURLs := map[string][]string{
+ "matrix": {"url('VT323-Regular.woff2')"},
+ "retro": {"url('VT323-Regular.woff2')"},
+ "retrofuture": {
+ "url('orbitron-v35-latin_latin-ext-700.woff2')",
+ "url('orbitron-v35-latin_latin-ext-regular.woff2')",
+ "url('share-tech-mono-v16-latin_latin-ext-regular.woff2')",
+ },
+ }
+ if assets, ok := fontAssets[theme]; ok {
themeDir := filepath.Join(outputDir, "themes", theme)
- for _, fname := range []string{"VT323-Regular.woff2", "FONT_LICENSE.txt"} {
+ for _, fname := range assets {
path := filepath.Join(themeDir, fname)
info, err := os.Stat(path)
if err != nil {
@@ -471,7 +490,9 @@ func TestThemeSelection(t *testing.T) {
}
themeCSS := readFile(t, filepath.Join(themeDir, "theme.css"))
- assertContains(t, themeCSS, "url('VT323-Regular.woff2')", theme+" local font URL")
+ for _, fontURL := range fontURLs[theme] {
+ assertContains(t, themeCSS, fontURL, theme+" local font URL")
+ }
for _, forbidden := range []string{"googleapis", "gstatic", "fonts.cdn", "@import url(http"} {
if strings.Contains(themeCSS, forbidden) {
t.Fatalf("%s theme.css contains runtime third-party font reference %q", theme, forbidden)
diff --git a/internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt b/internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt
new file mode 100644
index 0000000..7e0a4c7
--- /dev/null
+++ b/internal/generator/templates/themes/retrofuture/FONT_LICENSE.txt
@@ -0,0 +1,54 @@
+Retrofuture theme fonts
+=======================
+
+This directory bundles the web fonts:
+
+ orbitron-v35-latin_latin-ext-regular.woff2 (weight 400)
+ orbitron-v35-latin_latin-ext-700.woff2 (weight 700)
+ share-tech-mono-v16-latin_latin-ext-regular.woff2 (weight 400)
+
+Subsets:
+
+ Orbitron latin, latin-ext
+ Share Tech Mono latin, latin-ext
+
+Source / version
+----------------
+- Orbitron family page : https://fonts.google.com/specimen/Orbitron
+- Orbitron copyright : The Orbitron Project Authors
+- Orbitron original designer : Matt McInerney
+- Orbitron webfont set : orbitron-v35 (latin + latin-ext)
+- Orbitron fetched via : Google Fonts CSS2 API for Orbitron 400/700
+- Orbitron upstream source : https://github.com/google/fonts/tree/main/ofl/orbitron
+- Orbitron project source : https://github.com/theleagueof/orbitron
+- Orbitron converted : TTF to woff2 with fonttools pyftsubset --flavor=woff2
+- Orbitron fetched on : 2026-05-01
+- Share Tech Mono family page : https://fonts.google.com/specimen/Share+Tech+Mono
+- Share Tech Mono designer : Carrois Apostrophe
+- Share Tech Mono webfont set : share-tech-mono-v16 (latin + latin-ext)
+- Share Tech Mono fetched via : Google Fonts CSS2 API for Share Tech Mono 400
+- Share Tech Mono upstream : https://github.com/google/fonts/tree/main/ofl/sharetechmono
+- Share Tech Mono converted : TTF to woff2 with fonttools pyftsubset --flavor=woff2
+- Share Tech Mono 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/
+ - Orbitron source : https://github.com/google/fonts/tree/main/ofl/orbitron
+ - Share Tech Mono source : https://github.com/google/fonts/tree/main/ofl/sharetechmono
+
+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 Names "Orbitron" or "Share Tech Mono".
+
+Required attribution
+--------------------
+Font: "Orbitron" by The Orbitron Project Authors - https://github.com/theleagueof/orbitron
+ Licensed under the SIL Open Font License 1.1.
+
+Font: "Share Tech Mono" by Carrois Apostrophe - https://github.com/google/fonts/tree/main/ofl/sharetechmono
+ Licensed under the SIL Open Font License 1.1.
diff --git a/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-700.woff2 b/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-700.woff2
new file mode 100644
index 0000000..550d16f
--- /dev/null
+++ b/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-700.woff2
Binary files differ
diff --git a/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-regular.woff2 b/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-regular.woff2
new file mode 100644
index 0000000..f58a789
--- /dev/null
+++ b/internal/generator/templates/themes/retrofuture/orbitron-v35-latin_latin-ext-regular.woff2
Binary files differ
diff --git a/internal/generator/templates/themes/retrofuture/share-tech-mono-v16-latin_latin-ext-regular.woff2 b/internal/generator/templates/themes/retrofuture/share-tech-mono-v16-latin_latin-ext-regular.woff2
new file mode 100644
index 0000000..3c52912
--- /dev/null
+++ b/internal/generator/templates/themes/retrofuture/share-tech-mono-v16-latin_latin-ext-regular.woff2
Binary files differ
diff --git a/internal/generator/templates/themes/retrofuture/theme.css b/internal/generator/templates/themes/retrofuture/theme.css
index 7328391..165798d 100644
--- a/internal/generator/templates/themes/retrofuture/theme.css
+++ b/internal/generator/templates/themes/retrofuture/theme.css
@@ -1,3 +1,28 @@
+ /* Self-hosted web fonts: Orbitron and Share Tech Mono (SIL OFL 1.1).
+ Sources: https://fonts.google.com/specimen/Orbitron and
+ https://fonts.google.com/specimen/Share+Tech+Mono
+ See FONT_LICENSE.txt in this directory. */
+ @font-face {
+ font-family: 'Orbitron';
+ src: url('orbitron-v35-latin_latin-ext-regular.woff2') format('woff2');
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
+ }
+ @font-face {
+ font-family: 'Orbitron';
+ src: url('orbitron-v35-latin_latin-ext-700.woff2') format('woff2');
+ font-weight: 700;
+ font-style: normal;
+ font-display: swap;
+ }
+ @font-face {
+ font-family: 'Share Tech Mono';
+ src: url('share-tech-mono-v16-latin_latin-ext-regular.woff2') format('woff2');
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
+ }
:root { --pink:#ff6b9d; --purple:#00d9c0; --orange:#ff8c42; --bg:#0a0121; }
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Share Tech Mono',monospace; background:var(--bg);