You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ship the demo as a static site deployed to GitHub Pages
TypeCraft has no real server dependency - projects live in localStorage
and fonts compile client-side - so the whole app now exports statically:
- Preset base designs are fetched directly from the Fontsource CDN on
jsDelivr as static WOFF1 files (CORS-enabled), replacing the
/api/font-proxy route, which is removed
- /editor/[projectId] and /preview/[shareId] become /editor?project=
and /preview?share= so no dynamic segments remain
- next.config gains STATIC_EXPORT / NEXT_PUBLIC_BASE_PATH switches;
the starter-font fetch and share links are basePath-aware
- A GitHub Actions workflow builds the export and deploys it to GitHub
Pages on every push to main (enables Pages on first run)
- README gains the live demo link and updated architecture notes
Copy file name to clipboardExpand all lines: README.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,19 @@ A real browser-based type foundry. TypeCraft loads any font as **editable Bézie
9
9
10
10
Everything you see is the actual font: every preview is rendered with a real, freshly-compiled `FontFace`, not a CSS approximation.
11
11
12
+
**▶ Try it now — live demo: https://sbrophy-dev.github.io/TypeCraft/**
13
+
14
+
No account, no install. Projects live in your browser's localStorage; nothing leaves your machine.
15
+
12
16
## How it works
13
17
14
-
1.**Start from real outlines.** Remix one of ~19 curated open-licensed designs (Inter, Playfair, Space Mono, Bebas Neue, Caveat…), upload your own TTF/OTF/WOFF, or open a blank canvas. Imported fonts are normalized to a 1000-UPM, Y-up outline model with consistent winding.
18
+
1.**Start from real outlines.** Remix one of ~19 curated open-licensed designs (Inter, Playfair, Space Mono, Bebas Neue, Caveat…) fetched as static WOFFs from the Fontsource CDN, upload your own TTF/OTF/WOFF, or open a blank canvas. Imported fonts are normalized to a 1000-UPM, Y-up outline model with consistent winding.
15
19
2.**Style with geometry, not tricks.** Each control performs a genuine operation on the vectors:
16
20
-**Weight** offsets the outline along its normals (miter-limited, with self-intersection cleanup so heavy weights stay clean).
17
21
-**Contrast** thins horizontal strokes relative to vertical stems.
18
22
-**Width / x-Height / Slant** rescale, remap and shear the outlines.
19
23
-**Rounding** replaces sharp corners with Bézier fillets; **Roughen** adds deterministic hand-drawn jitter; **Hollow** turns letters into outlined forms.
20
-
3.**Redraw any glyph.** A full vector editor: drag anchors and handles, toggle smooth/corner points, insert and delete points, draw new contours with the pen tool, marquee-select, nudge with the keyboard, and drag the sidebearings — all over live metric guides with a ghost of the original and the styled result.
24
+
3.**Redraw any glyph.** A full vector workstation: pen, rectangle and ellipse tools; smart snapping to points, metric guides and a unit grid; per-glyph undo/redo; flip / rotate / align operations; a contour clipboard that works across glyphs (turn a `d` into a `b`); numeric coordinates; and a trace-reference underlay for drawing over any other glyph or the bundled template — all over live metric guides with a ghost of the original and the styled result.
21
25
4.**Export a real font.** Compile to OpenType in-browser and download **OTF + WOFF2 + a CSS `@font-face` kit + sample HTML**, zipped.
22
26
23
27
## Tech stack
@@ -47,17 +51,26 @@ npm run dev # http://localhost:3000
47
51
48
52
> **Tip:** don't run `npm run build` while `npm run dev` is live — they share the `.next` directory.
49
53
54
+
## Demo deployment
55
+
56
+
The app has no server dependencies (projects live in localStorage, fonts compile client-side, presets come from a CORS-enabled CDN), so it exports as a fully static site:
57
+
58
+
```bash
59
+
STATIC_EXPORT=1 npm run build # writes ./out
60
+
```
61
+
62
+
Every push to `main` builds and deploys the demo to **GitHub Pages** via [.github/workflows/deploy-pages.yml](.github/workflows/deploy-pages.yml). `NEXT_PUBLIC_BASE_PATH` handles the `/TypeCraft` subdirectory automatically.
0 commit comments