pdftract/crates
jedarden a39482f622 feat(pdftract-2q6sg): implement per-glyph advance computation and device bbox
Implemented compute_glyph_advance and compute_device_bbox functions for Phase 3
text processing with Tc/Tw/Tz corrections per ISO 32000-1 sec 9.2.4.

- compute_glyph_advance: Returns per-glyph text-space advance width incorporating
  Tc (char_spacing), Tw (word_spacing only for 0x20 in simple fonts), and Tz (horiz_scaling)
- compute_device_bbox: Maps glyph's font-unit bbox to PDF user space via
  text_matrix * CTM transformation with text rise (Ts) offset
- Font metrics dispatch: Std14 fonts use hardcoded widths, Type1/TrueType use /Widths
  array, Type0 use CID -> width (placeholder), Type3 use /Widths array
- is_simple_font helper: Identifies Type1/TrueType/MMType1 for Tw application

Passing acceptance criteria tests:
- 12pt Helvetica 'H' advance = 8.664 (722/1000 * 12)
- Tc 1 Tw 5 Tz 100 space advance = 9.336 ((278/1000 * 12) + 1 + 5)
- Tz 50 halves advance, font_size 0 returns 0 (no panic)
- is_simple_font correctly identifies Type1/TrueType, excludes Type0

Closes: pdftract-2q6sg
2026-05-26 16:58:13 -04:00
..
pdftract-cer-diff docs(pdftract-aawrz): add LICENSE-MIT and LICENSE-APACHE files 2026-05-23 10:36:28 -04:00
pdftract-cli fix(bf-3gmkz): implement XrefResolver::resolve by using resolve_with_source 2026-05-26 01:31:57 -04:00
pdftract-core feat(pdftract-2q6sg): implement per-glyph advance computation and device bbox 2026-05-26 16:58:13 -04:00
pdftract-libpdftract feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
pdftract-py feat(pdftract-3h9xo): implement threads JSON output + schema integration 2026-05-25 13:40:15 -04:00