feat: bundle brand typography across Apple apps - #160
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 24 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Pull request overview
Bundles licensed brand typography (GT America across iOS/watchOS/tvOS; Berkeley Mono on iOS/watchOS only) via checksummed, gitignored provisioning, and wires semantic design-token typography roles to exact native faces with proof/verification across all three shells.
Changes:
- Add a checksummed font manifest plus Node provisioning/verification scripts, and integrate them into bootstrap/verify/CI flows.
- Update Tuist project generation to include per-target font resources and
UIAppFontsderived fromConfig/BrandFonts.json. - Update design-token generation + Swift theme adapter to map semantic roles to native font face names, add tabular-digit roles, and add harness/UI + tests to prove fallback/coverage.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Tools/PutioHarness/Sources/PutioHarnessKit/Doctor.swift | Requires Node and turns brand-font provisioning verification into a required doctor check. |
| scripts/verify.sh | Adds font-bundle verification after building. |
| scripts/verify-font-bundles.ts | Verifies built app bundles’ font resources and UIAppFonts against the manifest. |
| scripts/verify-font-bundles.test.ts | Unit tests for font resource discovery behavior. |
| scripts/sync-brand-fonts.ts | Implements checksummed provisioning and strict origin/redirect validation for licensed font downloads. |
| scripts/sync-brand-fonts.test.ts | Unit tests for manifest parsing and unlisted-font detection/removal. |
| scripts/harness-ci.sh | Runs harness proof for all platforms in CI rather than iOS-only. |
| scripts/generate-design-tokens.ts | Generates Swift typography roles with native face names + adds tabular-digit roles and tvOS mono gating. |
| scripts/generate-design-tokens.test.ts | Tests native-face mapping and platform gating in generated Swift. |
| scripts/bootstrap.sh | Provisions fonts during bootstrap before generation/doctor. |
| README.md | Documents the new font provisioning/verification workflow and platform typography behavior. |
| Project.swift | Loads Config/BrandFonts.json to register per-target font resources and UIAppFonts. |
| Packages/PutioCore/Tests/PutioCoreTests/PutioThemeTests.swift | Updates tests for the new PutioFontRole initializer and validates mapped face names. |
| Packages/PutioCore/Tests/PutioCoreTests/BrandTypographyTests.swift | Adds CoreText shaping tests to prove fallback works for hostile filenames and required faces exist. |
| Packages/PutioCore/Sources/PutioCore/Generated/PutioTheme+Generated.swift | Updates generated theme adapter to use native face names and adds tabular-digit roles + tvOS mono gating. |
| package.json | Adds font provisioning/verification scripts and expands Node test globbing. |
| mise.toml | Adds fonts-setup and verify-fonts tasks; updates harness-ci task description. |
| CONTRIBUTING.md | Documents the licensed-font provisioning workflow and failure modes. |
| Config/BrandFonts.json | Adds the checksummed, platform-scoped brand font manifest. |
| Apps/watchOS/Sources/PutioWatchApp.swift | Adds harness-only typography proof content (hostile filenames + numeric sample). |
| Apps/tvOS/Sources/PutioTVApp.swift | Adds harness-only typography proof content (hostile filenames + numeric sample). |
| Apps/iOS/Sources/PutioApp.swift | Adds harness-only typography proof content (hostile filenames + numeric sample). |
| .gitignore | Ignores provisioned licensed font binaries directory. |
| .github/workflows/ci-next.yml | Provisions licensed fonts in CI before running mise run verify. |
Suppressed comments (1)
scripts/verify-font-bundles.ts:67
- Same as above: format the UIAppFonts mismatch output with joined lines so failures are readable and copy/paste friendly.
if (registered.join("\n") !== expected.join("\n")) {
throw new Error(`${label} UIAppFonts differs\nexpected: ${expected}\nactual: ${registered}`);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 11 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Closes #126
Summary
Review aids
Verification
Notes