@qrcommunication/gigapdf-lib 0.110.3 → 0.110.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,31 @@ project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.110.4] - 2026-06-30
10
+
11
+ ### Fixed — repacked CIDFont subset web-font cmap (`extractWebFont` no longer garbles labels)
12
+
13
+ - `extract_font_for_web` now **rebuilds** the served `cmap` for a Type0/CIDFontType2
14
+ subset (e.g. `ECYBWA+TimesNewRoman`) from the **authoritative** `code → CID → gid`
15
+ mapping (the same one the rasterizer uses) + the font's `/ToUnicode` (ASCII gaps
16
+ affine-filled via `infer_ascii_gaps`) + the embedded program's `gid → Unicode` —
17
+ instead of trusting the subset's **stale** embedded `(3,1)` cmap, which maps each
18
+ Unicode to the original, now-blanked glyph id (the real outlines sit at the gids
19
+ reached only by `code → CID → gid`). A repacked subset previously rendered its
20
+ text as garbage in a host browser (e.g. "Nom et adresse de l'organisme" →
21
+ "Nç ê Dçê D ê"); the cmap is now rebuilt **even when** the subset already has a
22
+ Unicode cmap, and only the embedded cmap is kept when the rebuild is empty. PDF
23
+ rasterisation (`code → CID → gid`) was always correct. Non-repacked subsets keep
24
+ their correct cmap — no regression.
25
+ - New `TrueTypeFont::post_name_to_gid()` / `glyph_is_empty()` and
26
+ `encoding::standard_mac_glyph_name()` back an authoritative TrueType `post`
27
+ name→gid resolver for simple-font subsets. Test:
28
+ `repacked_cid_subset_serves_real_glyphs` (skips unless `GIGAPDF_REPACKED_CID_FIXTURE`
29
+ points at a repacked-CID PDF — the reproducing CERFA carries PII and is not committed).
30
+ - Known limitation: a few non-ASCII Latin accents (`è`/`à`/`ç`) absent from a
31
+ subset's `/ToUnicode` and off the affine ASCII layout may stay unmapped; `é` and
32
+ all ASCII render correctly.
33
+
9
34
  ## [0.110.3] - 2026-06-30
10
35
 
11
36
  ### Fixed — CFF advance widths (`extractWebFont` no longer jams text in the browser)
package/gigapdf.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrcommunication/gigapdf-lib",
3
- "version": "0.110.3",
3
+ "version": "0.110.4",
4
4
  "description": "TypeScript SDK for gigapdf-lib — a Rust→WASM document engine with no third-party PDF/Office/image library: read/edit/render, OCR, full-text search, AcroForm fields (read · fill · create), annotations, signing, encryption, PDF↔Office/HTML/RTF conversions, and a native HTML+CSS→PDF renderer with inline JavaScript (no headless browser). Cryptography uses audited RustCrypto; JavaScript uses the Boa engine; everything else is pure Rust. Single wasm-bindgen-free .wasm with one host import (entropy).",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Rony Licha / QR Communication",