Skip to content

Improve glyph mapping for non-embedded CID fonts - #21726

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
calixteman:issue21523
Aug 9, 2026
Merged

Improve glyph mapping for non-embedded CID fonts#21726
timvandermeij merged 1 commit into
mozilla:masterfrom
calixteman:issue21523

Conversation

@calixteman

Copy link
Copy Markdown
Contributor

When a non-embedded CID font lacks both a glyph map and a ToUnicode entry, its CIDs are glyph IDs and PDF.js must infer an ordering. The standard-font map does not match Trebuchet MS or Windows Symbol.

Build the Trebuchet MS mapping from MacStandardGlyphOrdering plus supplemental entries, and map Windows Symbol glyph IDs by character code. Also map Adobe arrow and integral extenders from private-use code points to Unicode.

It fixes #21713.

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.07%. Comparing base (821a741) to head (4513916).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21726      +/-   ##
==========================================
+ Coverage   90.05%   90.07%   +0.01%     
==========================================
  Files         264      264              
  Lines       66938    67034      +96     
==========================================
+ Hits        60281    60379      +98     
+ Misses       6657     6655       -2     
Flag Coverage Δ
browsertest 66.59% <100.00%> (+0.12%) ⬆️
fonttest 8.99% <1.98%> (-0.04%) ⬇️
integrationtest 69.27% <5.94%> (-0.10%) ⬇️
unittest 57.91% <4.95%> (-0.07%) ⬇️
unittestcli 56.63% <4.95%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@calixteman

Copy link
Copy Markdown
Contributor Author

/botio browsertest

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/a3b99ac3ef12bc7/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/aa4d66069aeb197/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/a3b99ac3ef12bc7/output.txt

Total script time: 16.64 mins

  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.241.84.105:8877/a3b99ac3ef12bc7/reftest-analyzer.html#web=eq.log

When a non-embedded CID font lacks both a glyph map and a ToUnicode entry, its CIDs are glyph IDs and PDF.js must infer an ordering. The standard-font map does not match Trebuchet MS or Windows Symbol.

Build the Trebuchet MS mapping from MacStandardGlyphOrdering plus supplemental entries, and map Windows Symbol glyph IDs by character code. Also map Adobe arrow and integral extenders from private-use code points to Unicode.

It fixes mozilla#21713.
@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/aa4d66069aeb197/output.txt

Total script time: 23.75 mins

  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.193.163.58:8877/aa4d66069aeb197/reftest-analyzer.html#web=eq.log

@timvandermeij
timvandermeij merged commit 4099f2c into mozilla:master Aug 9, 2026
20 of 21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Looks good, including the reference test differences. Thanks!

/botio makeref

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/d4dabd472ca85e3/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3c9876a5fcf3dd4/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/d4dabd472ca85e3/output.txt

Total script time: 16.54 mins

  • Make references: Passed
  • Check references: Passed

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/3c9876a5fcf3dd4/output.txt

Total script time: 23.74 mins

  • Make references: Passed
  • Check references: Passed

@calixteman
calixteman deleted the issue21523 branch August 10, 2026 07:42
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.

[Bug]: Unreadable postalveolar sibilants

4 participants