From 8148988eb86979b72fedb41ccf0fda7e47b89dce Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 7 Oct 2026 09:16:43 -0400 Subject: [PATCH 1/2] Docs: allow Noto CJK (via craft-fonts) for Chinese text Maintainer decision: Noto Sans/Serif CJK is Google-branded Source Han (Adobe co-developed); nearly every OFL Chinese face derives from it, and the Simplified/Traditional Chinese UI (#184, #198) uses Noto Sans CJK SC from craft-fonts. Record it as a narrow, explicit exception to the Adobe-asset rule. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 7 +++++-- CLAUDE.md | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 393db2b1..597e207f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -63,7 +63,10 @@ of it. Full standard: `../craftrules/standards/never-crash.md` - **Never use any iconography, image, artwork, font, sound or other asset from Adobe products** (no Lightroom/Creative Cloud icons, no screenshots, no presets/profiles/LUTs, no UI bitmaps — not even as a temporary placeholder or "reference copy"). Observing Adobe's UI to imitate *layout and behaviour* is allowed; copying or tracing its assets is not. - **This includes Adobe's open-licensed assets**: no Source Sans/Serif/Code or Source Han fonts, no Adobe Fonts, no Adobe-published icon sets, sample photos, colour profiles or LUTs — even when OFL/MIT. The UI font is Inter (OFL); - Japanese fonts come from craft-fonts (below). + Japanese and Chinese fonts come from craft-fonts (below). **One exception (maintainer decision, 2026-10-07): Noto + Sans/Serif CJK** (Google-branded, OFL, co-developed with Adobe as Source Han) is allowed via craft-fonts for Chinese + text, because nearly every OFL Chinese face derives from it. Use it unmodified under its OFL; this does not open the + door to Source Han under Adobe's name or to any other Adobe asset. - Every asset in the repository must be one of: **our own original work** (e.g. icons drawn in code as vectors, procedurally generated demo photos), **public domain / CC0**, **Creative Commons** (CC-BY / CC-BY-SA with attribution honoured), **OFL** (fonts), or **permissive open-source** (MIT/Apache-2.0/BSD/ISC) — or contributed by a person who created the asset and licenses it openly. - **Exception: `docs/brand/`.** The ArtCraft name, wordmark and logos there are ArtCraft Team trademarks, not open source and not covered by LightCraft's MIT OR Apache-2.0 licence (`LICENSE-MIT`, `LICENSE-APACHE`, `NOTICE`); their terms are in `docs/brand/LICENSE-brand.txt`. Use them only unmodified and never redraw, recolour or derive from them. - **Every asset must have an entry in `assets/ATTRIBUTION.md`** (path, title, author/creator, source URL or "original work", licence, date added, modifications) and its licence text when required (e.g. `assets/fonts/OFL-*.txt`). Add the entry in the same commit as the asset. Assets without an attribution entry must not be committed. @@ -72,7 +75,7 @@ of it. Full standard: `../craftrules/standards/never-crash.md` uses it as the optional build input `CRAFT_FONTS_DIR`: `git clone https://github.com/storytold/craft-fonts ../craft-fonts` then `CRAFT_FONTS_DIR=../craft-fonts cargo run -p lightcraft` (or any cargo/xtask command). `crates/engine/build.rs` embeds the manifest's fonts as `lightcraft_engine::CRAFT_FONTS` (wasm32: BIZ UDPGothic Regular only); the UI - (`theme::font_definitions`) and the export watermark renderer use its Japanese faces as fallbacks after Inter. Unset, + (`theme::font_definitions`) and the export watermark renderer use its CJK faces (picked by script) as fallbacks after Inter. Unset, `CRAFT_FONTS` is empty: everything builds, tests and runs, but Japanese text has no glyphs. Releases always build with it (`release.yml`, `CRAFT_FONTS_REQUIRED=1`) and ship the fonts' OFL licences. Tests that need these fonts skip without it; the FreeBSD CI job runs them with it. Rules: craftrules diff --git a/CLAUDE.md b/CLAUDE.md index 393db2b1..597e207f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,7 +63,10 @@ of it. Full standard: `../craftrules/standards/never-crash.md` - **Never use any iconography, image, artwork, font, sound or other asset from Adobe products** (no Lightroom/Creative Cloud icons, no screenshots, no presets/profiles/LUTs, no UI bitmaps — not even as a temporary placeholder or "reference copy"). Observing Adobe's UI to imitate *layout and behaviour* is allowed; copying or tracing its assets is not. - **This includes Adobe's open-licensed assets**: no Source Sans/Serif/Code or Source Han fonts, no Adobe Fonts, no Adobe-published icon sets, sample photos, colour profiles or LUTs — even when OFL/MIT. The UI font is Inter (OFL); - Japanese fonts come from craft-fonts (below). + Japanese and Chinese fonts come from craft-fonts (below). **One exception (maintainer decision, 2026-10-07): Noto + Sans/Serif CJK** (Google-branded, OFL, co-developed with Adobe as Source Han) is allowed via craft-fonts for Chinese + text, because nearly every OFL Chinese face derives from it. Use it unmodified under its OFL; this does not open the + door to Source Han under Adobe's name or to any other Adobe asset. - Every asset in the repository must be one of: **our own original work** (e.g. icons drawn in code as vectors, procedurally generated demo photos), **public domain / CC0**, **Creative Commons** (CC-BY / CC-BY-SA with attribution honoured), **OFL** (fonts), or **permissive open-source** (MIT/Apache-2.0/BSD/ISC) — or contributed by a person who created the asset and licenses it openly. - **Exception: `docs/brand/`.** The ArtCraft name, wordmark and logos there are ArtCraft Team trademarks, not open source and not covered by LightCraft's MIT OR Apache-2.0 licence (`LICENSE-MIT`, `LICENSE-APACHE`, `NOTICE`); their terms are in `docs/brand/LICENSE-brand.txt`. Use them only unmodified and never redraw, recolour or derive from them. - **Every asset must have an entry in `assets/ATTRIBUTION.md`** (path, title, author/creator, source URL or "original work", licence, date added, modifications) and its licence text when required (e.g. `assets/fonts/OFL-*.txt`). Add the entry in the same commit as the asset. Assets without an attribution entry must not be committed. @@ -72,7 +75,7 @@ of it. Full standard: `../craftrules/standards/never-crash.md` uses it as the optional build input `CRAFT_FONTS_DIR`: `git clone https://github.com/storytold/craft-fonts ../craft-fonts` then `CRAFT_FONTS_DIR=../craft-fonts cargo run -p lightcraft` (or any cargo/xtask command). `crates/engine/build.rs` embeds the manifest's fonts as `lightcraft_engine::CRAFT_FONTS` (wasm32: BIZ UDPGothic Regular only); the UI - (`theme::font_definitions`) and the export watermark renderer use its Japanese faces as fallbacks after Inter. Unset, + (`theme::font_definitions`) and the export watermark renderer use its CJK faces (picked by script) as fallbacks after Inter. Unset, `CRAFT_FONTS` is empty: everything builds, tests and runs, but Japanese text has no glyphs. Releases always build with it (`release.yml`, `CRAFT_FONTS_REQUIRED=1`) and ship the fonts' OFL licences. Tests that need these fonts skip without it; the FreeBSD CI job runs them with it. Rules: craftrules From 8b70d33d0fd1758623da2ab05f4b710e869532a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 17:32:09 +0000 Subject: [PATCH 2/2] Fix #319: release builds pin craft-fonts with Noto Sans CJK SC release.yml (five jobs) and freebsd.yml pinned craft-fonts abb83316, from before Noto Sans CJK SC landed there, so v0.4.0 embedded only the Japanese faces and most of the Simplified Chinese UI was tofu. The pin is now 8dcdacd5 (craft-fonts HEAD: Noto Sans CJK SC and Noto Sans Arabic), which the Noto CJK exception merged from #203 allows. docs/releasing.md says when to bump the pin and how to check it before a release. flake.nix / flake.lock (community-maintained, not in CI) still pin the old revision: the lock's narHash needs nix to recompute. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8 --- .github/workflows/freebsd.yml | 2 +- .github/workflows/release.yml | 10 +++++----- docs/releasing.md | 6 +++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index b777e26b..0b528ae1 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 path: craft-fonts - name: Build and test in a FreeBSD VM uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efd61ace..b9c3a1ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,7 +77,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 # bump deliberately + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 # bump deliberately path: craft-fonts - uses: dtolnay/rust-toolchain@stable with: @@ -135,7 +135,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 # bump deliberately + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 # bump deliberately path: craft-fonts - uses: dtolnay/rust-toolchain@stable with: @@ -192,7 +192,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 # bump deliberately + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 # bump deliberately path: craft-fonts - name: Install build and packaging tools run: | @@ -287,7 +287,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 # bump deliberately + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 # bump deliberately path: craft-fonts - name: Build and package in a FreeBSD VM (tar.gz) # vmactions/freebsd-vm v1.5.9, pinned by commit (it runs our build). @@ -336,7 +336,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: storytold/craft-fonts - ref: abb83316d96aa59c1cf64784289e378fe9fa5695 # bump deliberately + ref: 8dcdacd5153e64560d109541a47d806f26f048c0 # bump deliberately path: craft-fonts - uses: dtolnay/rust-toolchain@stable with: diff --git a/docs/releasing.md b/docs/releasing.md index cf75fa70..84b016c0 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -53,7 +53,11 @@ their runtime dependencies. Release builds fetch the pinned [`storytold/craft-fonts`](https://github.com/storytold/craft-fonts) revision and require it (`CRAFT_FONTS_REQUIRED=1`). Keep that pin deliberate when updating the -workflow. +workflow, and bump it (in `release.yml`, five jobs, and `freebsd.yml`) whenever craft-fonts adds a face a +shipped language needs: a stale pin still builds, it just ships tofu (issue #319: v0.4.0 pinned a revision +from before Noto Sans CJK SC, so Simplified Chinese had no glyphs). Before a release, check the pin against +craft-fonts' `fonts/manifest.txt` and run `CRAFT_FONTS_DIR=../craft-fonts cargo test -p lightcraft-ui-egui i18n`, +whose glyph-coverage test fails when a language's characters have no face. ## Signing credentials