render: gate advanced glyph outline payloads#1117
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces P19 advanced glyph payload vocabulary for GlyphOutline ops, adding three new payload families (color layers, bitmap glyph, sanitized SVG) with strict contracts, deterministic reject reasons, and a guarded CanvasKit COLRv1 solid/gradient replay subset.
Changes:
- Add
ColorLayersPayload,BitmapGlyphPayload,SvgGlyphPayloadand their validation contracts; bump schema minor version to 14 and exclusivity check across payload families. - Wire the new reject reasons (
UnsupportedColorGlyph/Bitmap/Svg) andTextVariantSelectionOptionsgates into the layer renderer and CanvasKit policy, with matching JSON serialization and TS types. - Implement a TypeScript
glyphOutlinePayloadStatusgate plus a CanvasKit renderer path that draws the guarded COLRv1 solid/linear/radial/sweep subset.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/paint/paint_op.rs | New payload types, exclusivity helper, and COLRv1 graph contract validation. |
| src/paint/mod.rs | Re-exports newly added payload types. |
| src/paint/schema.rs | Bumps schema_minor_version to 14. |
| src/paint/text_variants.rs | Adds MixedGlyphOutlinePayload scope error and validation. |
| src/paint/text_v2.rs | Marks advanced payload kinds as non-strict and produces fallback reasons. |
| src/paint/json.rs | Serializes color layers/bitmap/svg payloads and updates feature flags. |
| src/renderer/layer_renderer.rs | Reject-reason gates for new payloads plus tests. |
| src/renderer/canvaskit_policy.rs | Opens COLRv1 stage-1 graph gate for CanvasKit planning. |
| rhwp-studio/src/core/types.ts | TS types mirroring the new payload schema. |
| rhwp-studio/src/view/glyph-outline-payload-status.ts | TS payload gate parity with Rust. |
| rhwp-studio/src/view/canvaskit-renderer.ts | CanvasKit replay for guarded COLRv1 subset. |
| rhwp-studio/tests/render-backend.test.ts | Test coverage for the new TS gate. |
| docs/text-ir-v2.md, README.md | Documents P19 payload gates and CanvasKit subset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR #1117 처리 결과 보고서
1. 처리 요약PR #1117은 권장안대로 체리픽 수용했다. 이 PR은 2. 반영 커밋체리픽한 커밋: 원본 PR head: 3. 반영 내용주요 변경: Schema 변경: 4. 검토 결과검토 결론: 이유: 추가 maintainer-side 코드 수정은 하지 않았다. 5. 검증실행한 검증: 결과: 확인된 warning: 이번 PR 처리에서 새로 해결해야 할 실패는 없었다. 6. 남은 절차보고서 승인 후 다음 절차를 진행한다. |
|
PR #1117은 maintainer side에서 cherry-pick 수용했고, 검증 결과를 mydocs/pr/pr_1117_report.md에 기록했습니다. |
What
GlyphOutlinepayload vocabulary에colorLayers,bitmapGlyph,svgGlyph를 추가합니다.ColorLayers.colrV0,ColorLayers.colrV1,BitmapGlyph,SvgGlyphpayload contract와 family exclusivity check를 추가합니다.unsupportedColorGlyphreason으로TextRunfallback을 유지합니다.docs/text-ir-v2.md에 P19의 gate 성격, 열린 subset, non-goal을 정리합니다.Why
P18까지는 CanvasKit image replay의 direct coverage를 닫았습니다. 다음 단계에서 glyph payload를 전부 열면 fallback 조건과 payload family가 섞일 가능성이 큽니다.
이번 PR은 advanced glyph payload vocabulary와 reject/report contract를 먼저 고정하면서, 검증 가능한 첫 replay consumer로 COLRv1 solid/gradient graph subset만 엽니다. 즉
TextRunfallback은 계속 남겨두고, backend가 준비되지 않은 bitmap/SVG glyph나 복잡한 COLRv1 graph를 조용히 path/image처럼 처리하지 않도록 막습니다.Compatibility
GlyphRun/GlyphOutline은 canonical text path가 아니고 optional text variant입니다.GlyphOutlinepayload는 default selection에서 직접 replay되지 않고TextRunfallback을 유지합니다.schemaVersion: 1유지, additiveschemaMinorVersion: 14로 올립니다.Non-goals
Validation
cargo test --lib colrv1cargo test --lib serializes_advanced_glyph_outline_payload_gate_metadatanpm --prefix rhwp-studio test -- render-backendnpm --prefix rhwp-studio run buildcargo fmt --checkgit diff --checkRefs #536