mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
A /ToUnicode CMap with any unparsable part made the reading path discard the whole map and fall back to the font encoding, so search and redaction missed text the edit layer could read. Vendor hayro-cmap 0.1.0 and patch it to skip malformed bfchar/bfrange entries, unresolvable usecmap references and unparseable tails, keeping every readable entry, matching MuPDF/pdftotext and PdfCraft's own edit-layer parser. Fixes #3177. Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com>
22 lines
539 B
TOML
22 lines
539 B
TOML
[package]
|
|
name = "hayro-cmap"
|
|
version = "0.1.0"
|
|
description = "A parser for CMap files."
|
|
authors = { workspace = true }
|
|
edition = { workspace = true }
|
|
repository = { workspace = true }
|
|
license = { workspace = true }
|
|
|
|
[features]
|
|
default = ["embed-cmaps"]
|
|
std = []
|
|
# Embed the 61 predefined cmaps into the binary. Adds about ~250KB of brotli-encoded data.
|
|
embed-cmaps = ["std", "dep:brotli"]
|
|
|
|
[dependencies]
|
|
hayro-postscript = { workspace = true }
|
|
brotli = { workspace = true, optional = true, features = ["std"] }
|
|
|
|
[lints]
|
|
workspace = true
|