Skip to content

Add complete Adobe Glyph List 2.0 table - #254

Open
balazs-szucs wants to merge 1 commit into
feat/font-scanner-hardeningfrom
feat/adobe-glyph-list-dict
Open

balazs-szucs wants to merge 1 commit into
feat/font-scanner-hardeningfrom
feat/adobe-glyph-list-dict

Conversation

@balazs-szucs

@balazs-szucs balazs-szucs commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Description of Changes

Replaces the partial glyph table with the complete official Adobe Glyph List 2.0 dictionary and multi-codepoint AGL sequences. Full AGL coverage eliminates lookup misses for legacy, Cyrillic, and ligature glyph names during ToUnicode synthesis and font replacement.

Changed:

  • Add native/tools/generate_adobe_glyph_names.py and generate adobe_glyph_names.inc with 4,200+ single-scalar and multi-scalar AGL entries plus reverse Unicode lookup.
  • Extend jpdfium_font_encoding.h helpers and bundle ADOBE-GLYPHLIST-BSD-3.txt and NOTICE.txt license documentation.
  • Add native bidirectional AGL lookup and uXXXX checks to native/bridge/tests/smoke.cpp.

Checklist

General

  • I have read the Contributing Guide
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Notable user-facing changes are recorded under ## [Unreleased] in CHANGELOG.md

Library changes

  • Javadoc covers any new or changed public type or member
  • Public API changes are additive, or .github/workflows/compatibility.yml excludes the break with a reason
  • Version references stay consistent across the README, docs/installation.md, and the POMs

Native or FFM changes

  • Rebuilt the bridge at the stack tip (bash native/build-real.sh)
  • Ran ./gradlew :jpdfium:integrationTest
  • Updated native/bridge/include/jpdfium.h and the ABI notes for any ABI change

Testing

  • Added or updated tests that cover the change
  • ./gradlew :jpdfium:integrationTest passes

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

The saved review history does not include the base for the last reviewed commit. This saved history cannot establish the base for an incremental review. Comment @coderabbitai full review to establish a new review baseline. No full review was started, and the last reviewed checkpoint was preserved.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Summary

Summary by CodeRabbit

  • New Features
    • Added support for resolving Adobe glyph names that represent multiple Unicode characters.
    • Added reverse lookup from a Unicode character to its Adobe glyph name.
  • Bug Fixes
    • Improved glyph-name parsing: uXXXX names now require uppercase hexadecimal digits, while single-character uniXXXX names continue to accept either case. Unknown glyph names remain unresolved.

The change adds a generator for Adobe glyph-name tables, extends glyph-name and Unicode lookup behavior, and adds smoke checks for the mappings and sequences.

Changes: Adobe glyph-name lookup

Layer / File(s) Summary
Generate Adobe glyph tables
native/tools/generate_adobe_glyph_names.py
The script parses glyph-list entries, validates mapping counts and sequence width, and writes C++ declarations for single-scalar, sequence, and reverse lookup tables.
Resolve Adobe glyph names
native/bridge/include/jpdfium_font_encoding.h
The header adds uppercase-only hexadecimal validation for u-prefixed names, Adobe sequence-name lookup, and reverse lookup from a Unicode scalar to a glyph name. BaseEncoding now uses uint8_t as its underlying type.
Check glyph-name lookups
native/bridge/tests/smoke.cpp
Smoke checks cover glyph-name and Unicode mappings, unknown and case-sensitive names, and multi-codepoint sequences. The checks run after library initialization.

Possibly related PRs

  • Stirling-Tools/JPDFium#242: Adds Adobe glyph-name resolution paths that share lookup behavior with this change.
  • Stirling-Tools/JPDFium#253: Uses Adobe glyph-name handling and the reverse lookup helper in shared font-subsetting and normalization work.
  • Stirling-Tools/JPDFium#244: Adds Adobe Glyph List data and glyph-name resolution that overlap with this change’s mapping and sequence support.

Change: Feature

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "Add complete Adobe Glyph List 2.0 table" names the main change: the generated AGL 2.0 mapping table in adobe_glyph_names.inc. The objectives and summary also center on this table and its lo…
Description check Passed The description follows the repository template's sections (Description of Changes, General, Library changes, Native or FFM changes, Testing) and explains the main change: the full Adobe Glyph List 2.…
Full details: Title check

Explanation

The title "Add complete Adobe Glyph List 2.0 table" names the main change: the generated AGL 2.0 mapping table in adobe_glyph_names.inc. The objectives and summary also center on this table and its lookup helpers. The title omits the reverse lookup helpers, the sequence entries, and the encoding header changes, but those are secondary to the main change.

Full details: Description check

Explanation

The description follows the repository template's sections (Description of Changes, General, Library changes, Native or FFM changes, Testing) and explains the main change: the full Adobe Glyph List 2.0 table, the generator script, the header helpers, the bundled license files, and the smoke tests. Several checklist items are unchecked, and the description does not state whether the public API change is additive. The author also checks 'Rebuilt the bridge' and 'Ran integrationTest' items, which are reported but not verified here. The description says the change adds 4,200+ entries, while the objectives mention a 4,200 entry table, which is consistent. However, the description's 'Closes #' issue reference is missing, and the template's changed-header/ABI note is not addressed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.

@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 519ab57 to d53f372 Compare November 11, 2026 00:43
@balazs-szucs
balazs-szucs added this pull request to stack #255 November 11, 2026 00:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Resolve sequence-valued ligature components. · jpdfium_font_encoding.h:164

native/bridge/include/jpdfium_font_encoding.h:164
Minor · Functional Correctness · Quick win

Resolve sequence-valued ligature components.

The new sequence lookup applies only to the whole name. For dalethatafpatah_A, this loop calls the scalar-only helper for dalethatafpatah and returns an empty sequence. Adobe’s mapping requires each component to resolve to a string before concatenation. (github.com)

Resolve each component with the sequence helper and append all its scalars.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1b74c22 and 12c2dcd.

Files selected for processing: 4

  • native/bridge/include/jpdfium_font_encoding.h
  • native/bridge/src/adobe_glyph_names.inc
  • native/bridge/tests/smoke.cpp
  • native/tools/generate_adobe_glyph_names.py
Files not fully reviewed because they exceed a per-file size limit: 1

  • native/bridge/src/adobe_glyph_names.inc

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Review details

Additional context used

Code guidelines: 1

.github/CODERABBIT_REVIEW.md — configured
Path-based instructions: 2

Apply the native ownership, C ABI, C++23, engine integration, memory, and SIMD rules from .github/CODERABBIT_REVIEW.md.

CodeRabbit configuration file

Files:

  • native/bridge/tests/smoke.cpp
  • native/bridge/include/jpdfium_font_encoding.h
Source excerpt: These rules apply to maintained source.

CodeRabbit inference engine (.github/CODERABBIT_REVIEW.md)

Files:

  • native/bridge/tests/smoke.cpp
  • native/bridge/include/jpdfium_font_encoding.h
  • native/tools/generate_adobe_glyph_names.py
Ruff (0.17.1)

native/tools/generate_adobe_glyph_names.py

[warning] 26-26: for loop variable line overwritten by assignment target

(PLW2901)


[warning] 32-32: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 61-64: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 68-68: Avoid specifying long messages outside the exception class

(TRY003)

Additional comments: 1

native/bridge/include/jpdfium_font_encoding.h: 1

152-152: Data Integrity & Integration

A production path uses the sequence mappings and carries valid sequences into /ToUnicode. The claim that only the smoke test uses them is contradicted.

@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from c6f77c0 to 8d2cb26 Compare November 11, 2026 15:44
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch 2 times, most recently from 09a84f6 to 5e2f034 Compare November 11, 2026 16:19
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 5e2f034 to 3537c52 Compare November 11, 2026 16:46
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch 2 times, most recently from 6c06276 to 5d2c463 Compare November 11, 2026 16:57
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 5d2c463 to 0151cb3 Compare November 11, 2026 16:59
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch 2 times, most recently from 14b5da2 to cacb03f Compare November 11, 2026 18:14
@balazs-szucs balazs-szucs changed the title Add complete Adobe Glyph List 2.0 mapping table and binary-search helpers Add complete Adobe Glyph List 2.0 table Nov 11, 2026
@balazs-szucs
balazs-szucs removed this pull request from stack #255 November 11, 2026 22:26
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from cacb03f to 96df967 Compare November 11, 2026 22:29
@balazs-szucs
balazs-szucs added this pull request to stack #268 November 11, 2026 22:31
@balazs-szucs
balazs-szucs removed this pull request from stack #268 November 11, 2026 22:55
@balazs-szucs
balazs-szucs added this pull request to stack #269 November 11, 2026 22:56
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 96df967 to f6fa3c4 Compare November 11, 2026 23:29
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from f6fa3c4 to 6a9d8c5 Compare November 11, 2026 23:57
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 6a9d8c5 to a69e5e1 Compare November 12, 2026 00:14
@coderabbitai coderabbitai Bot mentioned this pull request Nov 12, 2026
7 of 12 tasks
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from a69e5e1 to 0026aa5 Compare November 12, 2026 03:11
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 0026aa5 to f2a10b2 Compare November 14, 2026 00:14
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from f2a10b2 to 5a87abf Compare November 15, 2026 11:55
@balazs-szucs
balazs-szucs removed this pull request from stack #269 November 15, 2026 11:57
@balazs-szucs
balazs-szucs added this pull request to stack #298 November 15, 2026 12:00
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 5a87abf to 692d581 Compare November 15, 2026 16:48
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 692d581 to 3478119 Compare November 18, 2026 19:54
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from 3478119 to dda7cd3 Compare November 18, 2026 20:32
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
@balazs-szucs
balazs-szucs force-pushed the feat/adobe-glyph-list-dict branch from dda7cd3 to d209aab Compare November 19, 2026 12:57

This branch has not been deployed

No deployments
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