# Geist Pixel GridRender Kit

Vercelの [Geist Pixel](https://vercel.com/font?type=pixel) をScratch/TurboWarp上で描く「GridRender」実装一式です。**1文字 = 1回の`pen stamp`**、描画スプライトの共有コスチュームは **3枚**(268種類の固有グリフパターンを収容)。

## 内容物

| パス | 内容 |
|---|---|
| `dist/*.sb3` | そのままTurboWarpで開ける3つのデモ(通常版 / キャリア方式ミニデモ / 1衣装版デモ) |
| `rust/gridrender-search/` | コスチューム詰め込み探索器(Rust)。`cargo run --release -- --font-atlas <atlas.json> --output <out.json> --costume-dir <dir>` |
| `scripts/` | 生成・検証スクリプト一式(TypeScript / tsx) |
| `generated/` | 数値データ一式: 字形アトラス、探索結果、LUT入りのmanifest、公式TTFとの照合記録、キャリアPNG |
| `licenses/` | Geist PixelのSIL Open Font License 1.1条文 |

## 再現手順

公式配布物はこのキットに含まれていないため、先に入手してください:

1. [Geist Font公式リポジトリ](https://github.com/vercel/geist-font) から `GeistPixel-Square.ttf` と `GeistPixel.glyphspackage`(sources配下)を取得
2. `assets/` ディレクトリに両方を配置
3. 次を実行:

```sh
npm install
npm run build -- --force   # アトラス生成 → Rust探索 → SB3生成
npm run verify             # 全290文字×400セルを公式TTF基準で再サンプル照合
npm run compare-five -- --all
npm run build:demo         # 3キャリア方式のミニデモ
npm run build:simple       # 1衣装版デモ
npx tsc --noEmit
```

必要環境: Node.js 22+、Rust (cargo)、pnpm ではなくnpmで動作確認済み。

## このキットのライセンス

- `rust/`、`scripts/`、`generated/` のうち **人間が生成したコード・データ一式** は自由に使って構いません(元ネタの解説は[nakako-tvさんのGridRenderスタジオ](https://scratch.mit.edu/studios/51585841/)を参照)。
- `generated/` 内の字形データ・キャリアPNGは **公式Geist Pixel(OFL 1.1)から派生したデータ** です。Geist Pixel自体のライセンスは `licenses/GeistPixel-OFL-LICENSE.txt` を参照。派生物の再配布もOFLの条件に従ってください(販売禁止、ライセンス同梱など)。公式フォントのTTF/glyphsソース自体は同梱していないので、上記の手順で公式から入手してください。
- Geist Pixelの著作権は (c) 2023 Vercel, in collaboration with basement.studio にあります。
