Skip to content

render: add guarded GlyphRun layer variant contract#840

Open
seo-rii wants to merge 3 commits into
edwardkim:develfrom
seo-rii:render-p12
Open

render: add guarded GlyphRun layer variant contract#840
seo-rii wants to merge 3 commits into
edwardkim:develfrom
seo-rii:render-p12

Conversation

@seo-rii
Copy link
Copy Markdown
Contributor

@seo-rii seo-rii commented May 11, 2026

What

  • Text IR v2 위에 optional GlyphRun sidecar variant 계약을 추가합니다.
  • fontResources, font blob, face identity, replay eligibility 타입을 추가해서 glyph replay가 참조할 최소 폰트 메타데이터를 둡니다.
  • TextShapeLowerer를 추가합니다. 기본 lowering은 기존 TextRun fallback을 유지하고, shaping resolver가 export 가능한 glyph data를 줄 때만 GlyphRun sidecar를 붙입니다.
  • Layer JSON schema/resource table minor를 올립니다. 이번 PR 기준은 schema 1.9, resource table 1.3입니다.
  • native Skia path는 complete/portable/fill-only glyph variant만 선택하고, 조건이 맞지 않으면 TextRun fallback을 사용합니다.
  • Canvas2D/layered SVG transition path는 GlyphRun sidecar를 건너뛰고 기존 TextRun fallback을 유지합니다.
  • README와 docs/text-ir-v2.md에 P12의 범위와 현재 제한을 정리합니다.

Non-goals

  • 일반 문서 lowering에서 glyph id를 기본 emit하지 않습니다.
  • CanvasKit glyph replay는 아직 포함하지 않습니다.
  • glyph outline/stroke payload나 variantOps 기반 고급 sidecar 선택은 후속 단계로 둡니다.
  • 실제 문서 폰트 blob 추출 및 완전한 resource interning을 끝내는 PR은 아닙니다.

Compatibility

  • 기본 렌더링 경로는 계속 TextRun fallback입니다.
  • requiredFeatures는 비워 두고, GlyphRun은 optional sidecar로만 노출합니다.
  • 기존 Canvas/SVG consumer는 GlyphRun을 무시해도 동일하게 fallback replay를 사용할 수 있습니다.

Validation

  • cargo test -q paint::
  • cargo test -q --features native-skia skia --lib
  • cargo test -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant