render: add Text IR v2 compatibility contract#797
Closed
seo-rii wants to merge 1 commit into
Closed
Conversation
edwardkim
added a commit
that referenced
this pull request
May 11, 2026
…ract (P11) P11 단계 — P9 영역 영역 text replay parity 후속 영역 영역 Text IR v2 compatibility contract 추가. Skia native raster Issue #536 트래킹 단계적 진전: P4 #599 → P5 #626 → P6 #720 → P8 #761 → P9 #769 → P11 #797 중요: 본 PR 은 GlyphRun 을 기본 경로로 만드는 PR 이 아니라 TextRun v2 compatibility contract 를 완성하는 PR. 4 본질 원칙: - Compatibility first — 모든 backend 가 TextRun fallback 으로 렌더링 가능 - Additive schema — schemaMinorVersion + feature negotiation (기존 consumer 미파괴) - Source traceability — text_sources + TextRun.source span - Placement/cluster metadata — paintStyle/projectionKind/orientation/placement/clusterBasis/clusters/legacyVisuals 신규 인프라: - PaintOp::{CharOverlap, TextControlMark, TabLeader, TextDecoration} — explicit visual ops - PageLayerTree.text_sources + TextSourceTable (export-local) - TextRun.source span + 7 신규 metadata - schemaMinorVersion + resourceTableMinorVersion + feature negotiation - docs/text-ir-v2.md migration contract Renderer 정정 — 4 backend 동기 (feedback_image_renderer_paths_separate 권위 사례): - svg_layer.rs / canvas.rs / skia/renderer.rs / web_canvas.rs — 신규 special visual op skip (double-painting 방지) Non-goals (Still designing): - GlyphRun eligibility / font resource table / cluster basis / fallback diagnostics — P12+ 분리 검증: - cargo build/test/clippy --release ALL GREEN (clippy -D warnings) - native-skia 28/28 PASS (PR #769 인프라 보존) - 광범위 sweep 7 fixture / 170 페이지 / 회귀 0 (Compatibility first 원칙 입증) - 시각 판정 면제 (작업지시자 결정 — contract 정합 단계 + 결정적 검증 + sweep 통과) Refs #536
Owner
|
@seo-rii 검토 완료했습니다. 감사합니다. 처리 결과Merge commit: 본질P11 — Text IR v2 compatibility contract. PR #599 (P4) → #626 (P5) → #720 (P6) → #761 (P8) → #769 (P9) → P11 (#797) 단계적 진전 (Issue #536 트래킹). Compatibility first + Additive schema + Source traceability + Placement/cluster metadata 4 본질 원칙 영역 영역 TextRun fallback 유지 + 후속 GlyphRun / font resource / native glyph replay 영역 영역 schema contract 미리 열기. 검증
feedback_image_renderer_paths_separate 권위 사례 강화4 backend (svg_layer / canvas / skia/renderer / web_canvas) 동기 정정 — 신규 special visual op skip (double-painting 방지). 5/11 사이클 — Skia native raster 트래킹의 후속 단계 (P12+ GlyphRun 영역 영역 분리 명시), 수고하셨습니다. |
Owner
|
Merged. Merge commit: 098db01 |
edwardkim
added a commit
that referenced
this pull request
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 요약
이번 PR은 render P11 단계로, P9까지 반영된 최신
devel위에 Text IR v2 compatibility contract를 추가합니다.핵심은
TextRunfallback 의미를 바꾸지 않으면서, 앞으로 GlyphRun/font resource/native glyph replay로 넘어갈 수 있는 schema contract를 먼저 여는 것입니다. 즉, 이번 단계는 GlyphRun을 기본 경로로 만드는 PR이 아니라 TextRun v2 compatibility contract를 완성하는 PR입니다.Text IR v2 설계 메모
P11은 이 시리즈에서 Text IR v2 개념이 처음 들어오는 지점입니다. 다만 이 PR에서 Text IR v2를 완성하거나 기존 text replay contract를 대체하지는 않습니다. 기존
TextRunfallback을 유지한 채, 후속 GlyphRun/font resource/native glyph replay가 붙을 수 있는 compatibility contract를 먼저 여는 단계입니다.간단히 정리하면 아래 방향입니다.
TextRunfallback으로 렌더링할 수 있어야 합니다.schemaMinorVersion, feature negotiation metadata, text metadata를 추가하되 기존 consumer를 깨지 않게 둡니다.PageLayerTree.text_sources와TextRun.sourcespan으로 text op의 원문 범위를 추적할 수 있게 합니다.paintStyle,projectionKind,orientation,placement,clusterBasis,clusters,legacyVisuals로 text replay 의미를 더 명확히 표현합니다.GlyphRuneligibility, font resource table, cluster basis, fallback diagnostics는 P12 이후 guarded variant 작업에서 확정합니다.자세한 배경과 설계 메모는 repo 문서에 정리했습니다: https://github.com/seo-rii/rhwp/blob/render-p11/docs/text-ir-v2.md
주요 변경은 아래와 같습니다.
schemaMinorVersion,resourceTableMinorVersion,schema,resourceTablemetadata 추가usedFeatures,requiredFeatures,optionalFeatures,knownFeatures,textmetadata 추가PageLayerTree.text_sources와 export-localTextSourceTable추가TextRun.sourcespan을 JSON으로 exportTextRun.paintStyle,projectionKind,orientation,placement,clusterBasis,clusters,legacyVisualsexportPaintOp::CharOverlap,PaintOp::TextControlMark,PaintOp::TabLeader,PaintOp::TextDecoration추가docs/text-ir-v2.md에 Text IR v2 migration contract 문서화control mark 계열은 기존 renderer output option과 맞추기 위해
showParagraphMarks또는showControlCodes가 켜진 경우에만 external op로 낮춥니다. 반면 char overlap, tab leader, decoration은 visual payload가 항상 존재하므로 explicit op를 만들고, 기존 TextRun payload는 legacy mirror로 둡니다.관련 이슈
Refs #536
범위
이번 PR에 포함한 범위는 아래 정도입니다.
비목표
아래는 일부러 이번 PR에 넣지 않았습니다.
GlyphRun 계열은 font identity와 fallback 검증이 같이 필요합니다. 그래서 P11에서는 TextRun fallback을 그대로 유지하고, P12에서 guarded GlyphRun variant replay로 넘기는 편이 맞습니다.
테스트
git diff --check origin/devel..HEADcargo test --lib paint::json --features native-skiacargo test --lib paint::builder --features native-skiacargo test --lib layer --features native-skiacargo test --features native-skia --lib skia스크린샷
없음.
이번 PR은 Text IR schema/export contract 변경입니다. renderer visual output은 기존 TextRun fallback을 유지하고, 새 explicit visual op는 기존 renderer에서 double-painting 되지 않도록 skip합니다.