Files
effectcraft/CONTRIBUTING.md
T
Brandon ThomasandClaude Opus 5.5 12083230a8 Fonts: use craft-fonts as an optional build input
With CRAFT_FONTS_DIR=<craft-fonts checkout>, crates/text/build.rs embeds the
fonts in its manifest as effectcraft_text::fonts::CRAFT_FONTS (wasm32: only
BIZ UDPGothic Regular). Unset, CRAFT_FONTS is empty and nothing changes.

- Text engine: the Jpan faces are registered after the bundled ones and are
  the Japanese fallback before any system font (Mincho for serif text, BIZ
  UDPGothic otherwise; Han only when the locale puts Japanese first).
- UI: the Jpan faces are appended to every egui family, BIZ UDPGothic first.
- Tests: Japanese renders with real glyphs (text layout and every UI family)
  when built with craft-fonts, skipped otherwise; the app works without it.
- CI (FreeBSD) and release.yml check out craft-fonts at a pinned commit;
  releases set CRAFT_FONTS_REQUIRED=1 and packages carry the OFL licences.
- AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README, docs, ATTRIBUTION.md and
  NOTICE: fonts live in craft-fonts; how to build with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:23:06 -04:00

2.8 KiB

Contributing to EffectCraft

Thanks for helping. Please read AGENTS.md first: its rules on assets and clean-room work apply to everyone, people and AI agents alike, and they are not negotiable.

Setup

You need Rust 1.95 or newer.

cargo run -p effectcraft                 # the desktop app, with the demo project
cargo test --workspace
cargo xtask ci                           # what every commit must pass

Optional: build with the shared fonts from craft-fonts (Japanese UI and text fallback; release builds always do), and run their tests:

git clone https://github.com/storytold/craft-fonts ../craft-fonts
CRAFT_FONTS_DIR=../craft-fonts cargo test --workspace

Ground rules

  • Clean room. Work from After Effects' public documentation and its observable behaviour only. Never use Adobe artwork, presets or code, and never copy GPL/LGPL/AGPL code.
  • Every asset is attributed. Add a .attribution sidecar and an ATTRIBUTION.md row; cargo xtask assets checks it.
  • Fonts live in craft-fonts. Never commit font files here; add a font there and use it through CRAFT_FONTS_DIR (see AGENTS.md and craftrules standards/fonts.md).
  • Layering. Nothing below the interface layer depends on UI or OS crates; see docs/architecture.md.
  • Everything is a command. New features are engine commands with an id, label, menu path, shortcut and parameters, so the UI, the CLI and the MCP server get them at once. Interactive widgets register an automation id.
  • Never crash. Non-test code returns errors instead of panicking: no unwrap(), expect(), panic!, unreachable!, todo!, unimplemented! or unsafe, checked indexing and arithmetic on input-derived values, and a regression test with every crash fix. See the "Never crash" section of AGENTS.md.
  • Tests with every change, and green cargo xtask ci before every commit. One task per commit.

How to add…

  • An effect: add an EffectSpec in crates/effects (AE display name, category, parameters with AE's names, defaults and ranges) and its render function, with a determinism test and a behaviour test. If it reads the clock directly, add it to TIME_DEPENDENT.
  • A command: register it with cmd! in crates/engine/src/commands/, place it in the menu tree in crates/engine/src/menus.rs, and test it including undo.
  • A panel or dialog: crates/ui-egui/src/panels/; look at the result with the headless snapshot tool described in docs/testing.md.

Talk to us

Questions, ideas and bug reports are welcome on Discord and in GitHub issues.