@qrcommunication/gigapdf-lib 0.110.4 → 0.111.0

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,29 @@ project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.111.0] - 2026-07-01
10
+
11
+ ### Added — per-run text `segments` for pixel-faithful editable overlays (`TextElementInfo.segments`)
12
+
13
+ `page_text_elements` / `textElements(page)` now return, for each **justified or
14
+ per-glyph-positioned run** (a legal footer, a spread-out table cell), its
15
+ visually contiguous **`segments`** — each with its own text and page-space box.
16
+ A run drawn as ONE `Tj`/`TJ` but with large internal `TJ` position jumps used to
17
+ collapse those jumps to literal spaces, so a host that painted one editable box
18
+ per run tiled it wrong (fragments overlapped / drifted). Each segment is now
19
+ positioned from the **same pen walk the rasterizer uses** — real glyph widths
20
+ (`/Widths`·`/W`) plus `Tc` (char spacing), `Tw` (word spacing), `Tz` (horizontal
21
+ scale) and `TJ` kerns — so a host paints one box per fragment, 1:1 with the
22
+ render, while still editing the whole run via its `index`. `segments` is **empty**
23
+ for a plain run (its own `x`/`y`/`width` already position it), so the common case
24
+ is unchanged.
25
+
26
+ Internally the content-stream extractor now tracks `Tc`/`Tw`/`Tz` and derives
27
+ each horizontal LTR run's advance from that exact pen walk (a single source of
28
+ truth shared by the run's own box, the next run's start position, and the
29
+ segments), fixing sub-point inter-run drift on spaced/scaled text. Byte-identical
30
+ for content without spacing operators or internal jumps.
31
+
9
32
  ## [0.110.4] - 2026-06-30
10
33
 
11
34
  ### Fixed — repacked CIDFont subset web-font cmap (`extractWebFont` no longer garbles labels)