Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 1, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* fix: use dynamic count for beginbfrange declaration

Fixes garbled text copying in Chrome/Edge for PDFs with >256 unique characters

* Add changelog line

Addressed an issue with garbled text copying in Chrome/Edge for PDFs containing more than 256 unique characters.

* test: add tests for beginbfrange count declaration

Add test cases to verify that the beginbfrange count declaration
in ToUnicode CMap matches the actual number of bfrange entries.

- Test for fonts with >256 characters (multiple ranges)
- Test for fonts with <=256 characters (single range)

These tests ensure the fix for the beginbfrange count bug is
correct and prevent regression.

Related to #1659

* Revert "test: add tests for beginbfrange count declaration"

This reverts commit dda6f4a.

* Rewrite tests for beginbfrange count declaraton. Fix code style issue.

* fix(tests): remove unused variables in font.spec.js

Replace for loops with unused match variables with spread operator
to directly get array length, fixing ESLint no-unused-vars errors.

- Replace loop counting with [...rangeMatches].length
- Fixes ESLint errors at lines 152 and 197 in tests/unit/font.spec.js
- All tests pass successfully

---------

Co-authored-by: zhang_xiaoning <zxn@winning.com.cn>
@pull pull bot locked and limited conversation to collaborators Dec 1, 2025
@pull pull bot added the ⤵️ pull label Dec 1, 2025
@pull pull bot merged commit d010815 into kokizzu:master Dec 1, 2025
0 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant