Commit 2c3745c
fix(pdf): reconstruct zero-width space boxes as word separators
pdfium gives generated spaces a zero-width loose box at a wrong baseline. Dropping
them (to fix the 2305-pg9 jumble) also dropped real word-separator spaces, merging
words (`Information systems` → `Informationsystems`, `high-quality` → `highquality`).
Now reconstruct a degenerate space by spanning the gap to the next glyph on the
same line, so the sanitizer keeps it as a separator. A wrap (different baseline) or
a touching gap is left alone.
2206 272→264, 2203 255→253, 2305v1 56→54, normal_4pages 76→74; the 4 exact PDFs
unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a9be45c commit 2c3745c
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
402 | 430 | | |
403 | 431 | | |
404 | 432 | | |
| |||
0 commit comments