Skip to content

Non-embedded CID fonts resolve a substitute #92

Closed

Description

@michaelstonis

Parent

#86 → #33 Spec: Broadside v1

What to build

A CIDFontType0 or CIDFontType2 font without an embedded program asks the font resolver chain for a substitute and maps each CID through the collection's CID-to-Unicode table to a glyph in that substitute, so non-embedded CJK text gets glyphs instead of glyph 0. PDF widths keep driving positions.

Spec clauses

ISO 32000-2 §9.7.4, §9.7.6; ADR 0009

Builds on

Integrated earlier work: #54, #58, #59

Acceptance criteria

  • New corpus file text-cid-nonembedded.pdf (Adobe-Japan1, a few kana and kanji) yields non-zero glyph ids from a test-built system font, with the information diagnostic for substitution.
  • Without the CMaps package the font records the existing package-missing diagnostic and keeps CID-as-GID behaviour; strict mode does not throw.
  • Identity-ordering fonts with no CID-to-Unicode table fall back to the substitute's own cmap through ToUnicode when present.
  • The real-world content gate allowlist and snapshots are re-triaged for the new diagnostic counts.

Blocked by

None — can start immediately

Deliverables (every ticket)

  • Tests through the public seam (see the spec's Testing Decisions)
  • XML docs citing clauses on public types
  • Conformance map rows updated in the same PR
  • PublicAPI.Unshipped.txt updated
  • Fuzz target and benchmark where the ticket adds a parser, codec or hot path

Activity

  1. added
    taskUnit of work from the task template
    ready-for-agentTriaged: an agent can pick this up without further clarification
    on Oct 10, 2026
  2. michaelstonis commented on Oct 10, 2026

    @michaelstonis
    OwnerAuthor

    Done by PR #83's review fix pass: non-embedded CIDFontType0/2 fonts now go through the font resolver chain (PdfCidFont.Substitute, CidFontSubstitutionTests), with CID→Unicode→substitute cmap glyph selection and a diagnostic when nothing is found. The two leftover pieces (a dedicated corpus file and the Identity-ordering ToUnicode fallback) are carried into #93.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:3Phase 3ready-for-agentTriaged: an agent can pick this up without further clarificationtaskUnit of work from the task templatetrack:3A-display-listTrack 3A-display-list

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions