108 lines
5.8 KiB
Markdown
108 lines
5.8 KiB
Markdown
# Self-hosted fonts
|
||
|
||
These are unmodified binaries from official upstream sources. Only the faces
|
||
used by the site are retained: Lyth Mono regular/bold, EB Garamond regular/bold
|
||
and their italics, plus each family's regular TTF for build-time outline
|
||
extraction with `opentype.js`. Browsers use WOFF2, not the TTFs. No Nerd, Term,
|
||
Square, Round, variable, light, or medium faces are included.
|
||
|
||
## Lyth Mono
|
||
|
||
- Repository: <https://github.com/why-trv/LythMono>
|
||
- Selected non-prerelease release: **v0.10.0**, published 2026-02-06.
|
||
- Pinned tag commit: `71d1cf4f325663705ab41ee1908427ea435b2e5d`.
|
||
- Pinned Iosevka source submodule: `a90e82cf6f37cc9b82e47151024c86cfe0693874`.
|
||
- Official release archive:
|
||
<https://github.com/why-trv/LythMono/releases/download/v0.10.0/LythMono.zip>
|
||
- Archive SHA-256, checked against the GitHub release asset digest:
|
||
`06b8c05671572e8cba61bf494404d3b973df348c607cd33f3153a374247d6607`.
|
||
- Extracted only `LythMono/WOFF2/LythMono-Regular.woff2`,
|
||
`LythMono/WOFF2/LythMono-Bold.woff2`, and
|
||
`LythMono/TTF/LythMono-Regular.ttf` (hinted versions). The archive is not
|
||
retained.
|
||
- License: `LythMono-LICENSE.md`, copied from `LICENSE.md` at the pinned commit;
|
||
SIL Open Font License 1.1, including upstream copyright notices.
|
||
- Internal family: **Lyth Mono**. Regular full name: **Lyth Mono**;
|
||
PostScript name: **Lyth-Mono**. Bold PostScript name: **Lyth-Mono-Bold**.
|
||
Regular TTF version: `Version 0.10.0; ttfautohint (v1.8.4)`.
|
||
|
||
Regular TTF metrics (font units): units/em 1000; hhea ascender 925, descender
|
||
-195, line gap 50; OS/2 typo ascender 925, descender -245, line gap 0;
|
||
Windows ascent/descent 925/245; cap height 720; x-height 540. ASCII `0`, `W`,
|
||
`i`, `p`, and the four box glyphs below all advance **604** units (0.604em;
|
||
8.456px at 14px). This is not a 0.6em font. Glyph count: 12174.
|
||
|
||
| Character | Unicode | Glyph ID | Ink bounds `(xMin, yMin, xMax, yMax)` |
|
||
| --- | --- | --- | --- |
|
||
| │ | U+2502 | 7535 | (264, -245, 340, 925) |
|
||
| ├ | U+251C | 7561 | (264, -245, 604, 925) |
|
||
| └ | U+2514 | 7553 | (264, 306, 604, 925) |
|
||
| ─ | U+2500 | 7533 | (0, 306, 604, 374) |
|
||
|
||
These are real, nonempty outlines verified with `opentype.js`, not fallback
|
||
characters. The horizontal stroke's center is y=340, and vertical strokes
|
||
reach the font's 925/-245 line extents. Explicit line-height and vertical
|
||
alignment matter when joining animated strokes to text.
|
||
|
||
## EB Garamond
|
||
|
||
- Official source: <https://github.com/octaviopardo/EBGaramond12>
|
||
- Pinned commit: `106a4a6d377987459ae5e68673a4570f13b957fb`.
|
||
- This is the upstream revision recorded by Google Fonts in
|
||
`ofl/ebgaramond/METADATA.pb` at distribution commit
|
||
`f8c1d3d6cc75e30d77130bdcbfbff27e3b6233fe`.
|
||
- No published GitHub release is available at the source repository. Files
|
||
were downloaded directly from that pinned source commit, not a third-party
|
||
font CDN: `https://raw.githubusercontent.com/octaviopardo/EBGaramond12/106a4a6d377987459ae5e68673a4570f13b957fb/`.
|
||
- Source paths: `fonts/webfonts/EBGaramond-{Regular,Bold,Italic,BoldItalic}.woff2`
|
||
and `fonts/ttf/EBGaramond-Regular.ttf`.
|
||
- License: `EBGaramond-OFL.txt`, copied from `OFL.txt` at the pinned commit;
|
||
SIL Open Font License 1.1, including upstream copyright notices.
|
||
- Internal family: **EB Garamond**. Regular full name: **EB Garamond Regular**;
|
||
PostScript name: **EBGaramond-Regular**. Other included PostScript names:
|
||
**EBGaramond-Bold**, **EBGaramond-Italic**, **EBGaramond-BoldItalic**.
|
||
- The static regular TTF reports `Version 1.002; ttfautohint
|
||
(v1.8.4.16-eb64)`. Google Fonts' newer variable version is not included;
|
||
the static faces above are deliberately used as shipped by upstream.
|
||
|
||
Regular TTF metrics (font units): units/em 1000; hhea and OS/2 typo ascender
|
||
1007, descender -298, line gap 0; Windows ascent/descent 1047/390; cap height
|
||
650; x-height 400. Advances: `0` 480, `W` 916, `i` 245, `p` 519. Glyph count:
|
||
3247. It does not contain the four box-drawing characters above.
|
||
|
||
## Japanese / CJK fallback
|
||
|
||
Neither regular TTF maps any codepoints in Hiragana (U+3040–309F), Katakana
|
||
(U+30A0–30FF), CJK Unified Ideographs (U+4E00–9FFF), or Extension A
|
||
(U+3400–4DBF). `あ`, `ア`, `漢`, `日`, and `本` all map to glyph 0 in both.
|
||
Do not use their `.notdef` outlines for Japanese glyph extraction.
|
||
|
||
The proportional CSS stack uses installed `Noto Serif JP`, `Hiragino Mincho
|
||
ProN`, `Yu Mincho` / `YuMincho`, then generic `serif`. The mono stack retains
|
||
system monospace choices and installed `Noto Sans Mono CJK JP`. These are
|
||
fallback names only: no additional CJK font is downloaded or requested from
|
||
an external provider. Japanese metrics depend on the user's installed font.
|
||
|
||
## Build-time outlines
|
||
|
||
`src/lib/landing-glyphs.mjs` uses `opentype.js@2.0.0` during Astro rendering.
|
||
It reads `public/fonts/LythMono-Regular.ttf` from the site working directory,
|
||
extracts box glyphs directly through cmap (no programming ligatures or GSUB
|
||
shaping), and normalizes the vertical cell to the 24px tree row. Direct glyph
|
||
lookup also avoids Lyth Mono's contextual GSUB lookups that OpenType.js 2.0.0
|
||
does not support. The 0.604em advance and connection centers are retained;
|
||
tree stroke edges are expanded symmetrically by 25% for legibility (the resting
|
||
vertical stem is 1.33px). Cell boundaries stay fixed so neighboring glyphs join.
|
||
The distributed font binaries and ordinary text weights are unchanged.
|
||
|
||
The resulting SVG paths are emitted into static HTML; neither the parser nor
|
||
the TTF is fetched by the browser. Anime.js controls the shared tree transform
|
||
and reveals the persistent trunk through a mask; there is no switch back to
|
||
HTML box-drawing text on completion. Labels and normal content remain text.
|
||
|
||
## Integrity
|
||
|
||
`SHA256SUMS` records every font and upstream license in this directory. Verify
|
||
from this directory with `sha256sum --check SHA256SUMS`. Individual hashes
|
||
pin the exact binaries even if upstream tags or release assets change.
|