render: keep v2 authority gaps on text fallback#1429
Conversation
There was a problem hiding this comment.
Pull request overview
Tightens Text IR v2 “strict GlyphRun” selection/diagnostics so that experimental vocabulary (mixed-per-glyph orientation, per-glyph transforms, vertical orientation) is deterministically rejected and the existing TextRun fallback remains authoritative until the replay contract is proven.
Changes:
- Added explicit authority-pending reject reasons for
MixedPerGlyph,glyphTransforms, and vertical orientations, and locked them down with new selection tests. - Updated
TextV2Diagnosticsstrict/fallback logic to treat those cases as non-strict and to report the same authority-pending fallback reasons. - Added a regression test ensuring “font resolution/metrics only” does not emit public
GlyphRuns, and documented P26 authority/proof boundaries.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/renderer/layer_renderer.rs |
Adds new VariantRejectReasons and gates GlyphRun selection with authority-pending reasons + tests. |
src/paint/text_v2.rs |
Updates strictness + fallback-reason computation to account for orientation/transforms and keeps line-break risks report-only. |
src/paint/text_shape.rs |
Adds regression test ensuring lack of shaping proof prevents public GlyphRun emission. |
docs/text-ir-v2.md |
Documents P26 authority follow-ups and clarifies font metrics vs replay-proof boundary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if !matches!(run.orientation, GlyphRunOrientation::Horizontal) { | ||
| reasons.insert(VariantRejectReason::UnsupportedPaintEffect); | ||
| } |
| } | ||
|
|
||
| #[test] | ||
| fn mixed_per_glyph_runs_keep_text_fallback_until_transform_authority_exists() { |
|
@seo-rii 감사합니다. PR #1429 머지 완료했습니다. Text IR v2 P26 단계에서 MixedPerGlyph, glyphTransforms, vertical orientation을 안정 replay contract로 오인하지 않도록 authority pending reason으로 명확히 막고, TextRun fallback을 유지하는 방향이 적절했습니다. 검증 결과:
#536은 트래킹 이슈라 이번 PR merge 후에도 open 상태로 유지하겠습니다. 기여 감사합니다. |
What
P26 단계로 Text IR v2의 authority gap을 더 보수적으로 닫았습니다.
MixedPerGlyphglyph run은mixedPerGlyphAuthorityPending으로 reject하고TextRunfallback을 유지합니다.glyphTransforms가 있는 glyph run은glyphTransformAuthorityPending으로 reject하고TextRunfallback을 유지합니다.verticalGlyphOrientationAuthorityPending으로 reject하고TextRunfallback을 유지합니다.TextV2Diagnostics도 위 케이스를 strict variant로 보지 않고 같은 fallback reason을 보고합니다.lineBreakRisks는 strict variant가 있는 경우fallbackFreeStrict에서도 report-only telemetry로 남도록 고정했습니다.GlyphRun을 내보내지 않는 회귀 테스트를 추가했습니다.docs/text-ir-v2.md에 P26 authority follow-up과 font metrics/proof boundary를 정리했습니다.Why
P25까지 exact font replay proof corpus를 넓혔지만, Text IR v2에는 아직 future vocabulary가 남아 있습니다.
MixedPerGlyph, per-glyph transform, vertical orientation 같은 값은 schema vocabulary로는 존재하지만, cluster/grapheme orientation, transform replay, vertical fixture, backend fallback policy가 함께 증명되기 전까지 stable backend replay contract로 보면 안 됩니다.이번 PR은 새 replay family를 여는 변경이 아닙니다. 오히려 experimental vocabulary가 strict
GlyphRun으로 선택되지 않도록 deterministic reject reason을 추가하고, 기존TextRunfallback을 유지하는 단계입니다.#1421 리뷰에서 나온 font resolver/proof boundary 정리는 별도 후속으로 두는 게 맞다고 봅니다. 메트릭 DB, runtime fallback, portable
fontResourcesidentity를 섞지 않는 방향은 유지하되, 이 PR에서는 font resolver를 확장하지 않지만, resolver가 font availability/metrics 수준만 제공할 때는 publicGlyphRun을 내보내지 않는 contract를 테스트로 고정합니다.Compatibility
TextRunfallback 경로는 유지됩니다.MixedPerGlyph,glyphTransforms, vertical glyph orientation은 새 reason으로 fallback합니다.lineBreakRisks는 validation error가 아니라 telemetry로 유지됩니다.Non-goals
MixedPerGlyph또는 per-glyph transform replay를 구현하지 않습니다.MixedPerGlyphwriter emission을 열지 않습니다.--font-path/embedded font 후보 연결은 이 PR에 넣지 않습니다.Checks
git diff --check upstream/devel...HEADcargo fmt --checkCARGO_INCREMENTAL=0 cargo test --lib paint::text_shape -- --nocaptureCARGO_INCREMENTAL=0 cargo test --lib paint::text_v2 -- --nocaptureCARGO_INCREMENTAL=0 cargo test --lib renderer::layer_renderer -- --nocaptureCARGO_INCREMENTAL=0 cargo check --libRefs #536