@qrcommunication/gigapdf-lib 0.110.2 → 0.110.3

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,25 @@ project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.110.3] - 2026-06-30
10
+
11
+ ### Fixed — CFF advance widths (`extractWebFont` no longer jams text in the browser)
12
+
13
+ - `CffFont::advance_width` — and therefore the OpenType `hmtx` that `cff_to_otf`
14
+ builds for `extractWebFont` — now reads the CFF Private DICT **`nominalWidthX`**
15
+ (op 21) and **`defaultWidthX`** (op 20) instead of using `units_per_em * 0.5`
16
+ as a one-size base for every glyph. A CFF/Type1 subset of a standard base font
17
+ (e.g. **`Times-Bold`**) previously got a near-zero space advance
18
+ (`500 + (250 − 718) = 32`) and wrong letter advances, so a host rendering the
19
+ extracted web font in a browser **jammed every word together** (the CERFA
20
+ "DEMANDEDERATTACHEMENT…" garbling). PDF rasterisation (which uses the PDF
21
+ `/Widths` array) was unaffected — only the browser-loadable web font's metrics
22
+ were wrong; `extractWebFont` (0.110.0) was the first consumer of `advance_width`
23
+ for actual rendering, which is why the latent bug only surfaced then.
24
+ - `advance = nominalWidthX + operand` when a charstring carries a width operand,
25
+ `defaultWidthX` otherwise; per-FD for CID-keyed / CFF2 fonts (keyed by FDSelect).
26
+ Regression test: `cff_width_distinguishes_nominal_from_default_width_x`.
27
+
9
28
  ## [0.110.2] - 2026-06-30
10
29
 
11
30
  ### Added — `ocr_serve`: persistent host-side OCR microservice
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.2",
3
+ "version": "0.110.3",
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",