Skip to content

Conformance: CJK predefined-CMap checks (§6.1.13-10, §6.2.11.3.1-1, UA §7.21.3.1-1) #139

Open

Description

@Tim81

Three checks over composite fonts that use a predefined (non-embedded) Adobe CJK CMap are
incomplete:

  • §6.1.13-10 — a CID selected via a predefined CMap must not exceed the character collection's
    maximum CID.
  • §6.2.11.3.1-1 / UA §7.21.3.1-1 — the descendant CIDFont's CIDSystemInfo registry+ordering must
    match the predefined CMap's character collection.

Correction, 2026-08-28. This issue said all three are OutOfScope. They are Partial —
ConformanceCatalog.cs:199, :200 and :444 — and the residual differs per check, which changes
how much work each one is:

  • §6.2.11.3.1-1 and UA §7.21.3.1-1 say the predefined-CMap registry match is "authored but not
    cross-validated"
    . The rule exists. These need only a conformant CJK CIDFont oracle asset —
    no Adobe tables at all. UA §7.21.3.1-1 is now readable directly in ISO 14289-1, which is held;
    §6.2.11.3.1-1's ISO 19005-2 text is not.
  • §6.1.13-10 is the only one that names "the Adobe code→CID tables".

So two thirds of this issue is an asset problem, not an implementation problem.

The asset

Adobe's CMap resources are BSD-3-Clause (adobe-type-tools/cmap-resources for code→CID,
adobe-type-tools/mapping-resources-pdf pdf2unicode/ for CID→Unicode), so redistribution is fine
with attribution in the shape NOTICE:32-65 already uses for the Adobe Glyph List. Sizes are the
problem: 189 CMap programs across seven collections total ~7.1 MB of text, plus ~1.1 MB for the five
CID→Unicode maps. Compile to packed range tables with an eng/ script, on the
generate-shiftjis-table.py precedent, and commit the generated tables rather than the raw CMaps.

The font asset is Harano Aji Gothic (trueroad/HaranoAjiFonts, OFL-1.1) — CID-keyed OTF
explicitly re-CIDed to Adobe-Japan1, and as far as I can find the only open font with that ROS.
Source Han itself is Adobe-Identity-0 and will not do. It needs subsetting to a handful of CIDs;
fontTools/subset/cff.py:93-132 rewrites font.charset (which is the GID→CID map for CID-keyed
CFF) and FDSelect.gidArray while touching neither the ROS nor the top dict, so CIDs survive and
GIDs compact — but verify that empirically on the actual subset before committing it. The asset
belongs under tests/, beside DejaVuSans.ttf and SourceSans3-ExtraLight.otf; nothing there ships,
which keeps OFL-1.1 out of the package licence expressions entirely.

Start by probing what veraPDF actually checks

Before deciding what data §6.1.13-10 needs, craft a fixture and find out. A predefined Adobe CMap
cannot by construction emit a CID above its own collection's /CIDCount — each
Adobe-<Ordering>-<Supplement> CMap declares it, e.g. Adobe-Japan1-7 says /CIDCount 23060 — so the
check may reduce to comparing the CMap's collection and supplement against the descendant font's.
That needs a ~189-entry name → collection table and eight integers, not 7 MB of code→CID data.
Do not assume either way.

If the small table suffices, VellumPdf.Conformance ships it directly. If the full tables are
needed, §6.1.13-10 stays Partial rather than making a Stable package carry ~1 MB, or making a
catalog status depend on whether an optional package is installed.

Note on packaging

If this work does need the full tables, it — not #98 — is what forces a ninth NuGet package.
Text extraction runs on /ToUnicode and Identity-H and needs no character-collection tables at all.
That is why this issue sits in the conformance milestone (v2.5) rather than the extraction one
(v2.4): moving it took the ninth package, the Adobe-CMap licensing work and the unsolved
CJK-font-asset problem out of the extraction release at no cost to #98.

Touching the catalog

Moving any of the three trips the exact-set assertion at
tests/VellumPdf.Conformance.Tests/Coverage/ConformanceCatalogTests.cs:57-62 by design, and the
comment block at :48-52 documents the set. PredefinedCMaps.cs:19 already holds the authoritative
60-name ISO 32000-1 Table 118 list, documented at :12-17 as "the single authoritative copy" — use
it rather than duplicating it.

Activity

  1. added this to the Backlog milestone on Jul 2, 2026
  2. added
    area/conformance
    area/fonts
    type/feature
    priority/P2
    on Jul 2, 2026
  3. Tim81 commented on Jul 2, 2026

    @Tim81
    OwnerAuthor

    Follow-up from the #141 code review: these three checks are now classified Partial, not OutOfScope (commit 8c7a7ed).

    • Their common path is implemented and veraPDF-verified today: Identity and embedded-CMap CIDSystemInfo / CID-range checks (6.2.11.3.1-1, 7.21.3.1-1 CIDSystemInfo; 6.1.13-10 CID range for embedded CMaps).
    • Only the predefined-CJK-CMap residual is deferred here. Classifying the whole check OutOfScope removed it from the coverage denominator and let the catalog assert a flat 100%, which overstated coverage — so they're back to Partial (~99% honest parity).

    To finish (close this issue):

    1. Adobe character-collection code→CID lookup tables for the predefined CMaps (needed for 6.1.13-10 to resolve a shown byte code to a CID through the predefined CMap program).
    2. A conformant CJK CIDFont oracle asset so a compliant fixture can be cross-validated against veraPDF (a Latin program under a CJK encoding is rejected by veraPDF on unrelated §6.2.11.5 width grounds, so it can't prove the CIDSystemInfo/CID-range rule).

    The AdobeCharacterCollections registry table drafted during this work was reverted with the rest of the unverifiable attempt; it can be reintroduced once (1) and (2) are available.

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

    area/conformancearea/fontspriority/P2type/feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions